@dhyasama/totem-models 8.50.0 → 8.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/LimitedPartner.js +18 -0
- package/lib/Organization.js +3 -2
- package/package.json +1 -1
package/lib/LimitedPartner.js
CHANGED
|
@@ -657,6 +657,24 @@ module.exports = function(mongoose, config) {
|
|
|
657
657
|
|
|
658
658
|
};
|
|
659
659
|
|
|
660
|
+
LimitedPartner.statics.removeCustomerPeople = function removeCustomerPeople(customerId, cb) {
|
|
661
|
+
|
|
662
|
+
const self = this;
|
|
663
|
+
|
|
664
|
+
if (!cb) { throw new Error('cb is required'); }
|
|
665
|
+
if (!customerId) { return cb(new Error('customerId is required'), null); }
|
|
666
|
+
if (!mongoose.Types.ObjectId.isValid(customerId)) { return cb(new Error('customerId is not a valid ObjectId'), null); }
|
|
667
|
+
|
|
668
|
+
let query = self.update(
|
|
669
|
+
{ 'customer': customerId },
|
|
670
|
+
{ $set: { people: [] } },
|
|
671
|
+
{ multi : true }
|
|
672
|
+
);
|
|
673
|
+
|
|
674
|
+
query.exec(cb);
|
|
675
|
+
|
|
676
|
+
};
|
|
677
|
+
|
|
660
678
|
LimitedPartner.statics.search = function (terms, options, cb) {
|
|
661
679
|
|
|
662
680
|
const self = this;
|
package/lib/Organization.js
CHANGED
|
@@ -253,8 +253,9 @@ module.exports = function(mongoose, config) {
|
|
|
253
253
|
investmentsSheet: {
|
|
254
254
|
sheet: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
|
|
255
255
|
format: {
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
transformRounds: { type: Boolean, default: false },
|
|
257
|
+
transformUnrealized: { type: Boolean, default: false },
|
|
258
|
+
transformRealized: { type: Boolean, default: false }
|
|
258
259
|
},
|
|
259
260
|
googleSheetCreds: {
|
|
260
261
|
private_key_id: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
|