@dhyasama/totem-models 5.0.2 → 5.1.1
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/Organization.js +5 -0
- package/lib/Person.js +12 -0
- package/package-lock.json +1 -1
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -572,8 +572,13 @@ module.exports = function(mongoose, config) {
|
|
|
572
572
|
|
|
573
573
|
Organization.methods.addDeal = function(deal) {
|
|
574
574
|
|
|
575
|
+
console.log('Organization.methods.addDeal');
|
|
576
|
+
console.log(deal);
|
|
577
|
+
|
|
575
578
|
var self = this;
|
|
576
579
|
|
|
580
|
+
console.log(self.deals);
|
|
581
|
+
|
|
577
582
|
// Validate inputs
|
|
578
583
|
if (!deal) throw new Error('deal is required');
|
|
579
584
|
|
package/lib/Person.js
CHANGED
|
@@ -748,6 +748,18 @@ module.exports = function(mongoose, config) {
|
|
|
748
748
|
.exec(cb);
|
|
749
749
|
};
|
|
750
750
|
|
|
751
|
+
Person.statics.getList = function getList(cb) {
|
|
752
|
+
|
|
753
|
+
var self = this;
|
|
754
|
+
|
|
755
|
+
self
|
|
756
|
+
.find({'deleted': {$ne: true}})
|
|
757
|
+
.select('name contact.email')
|
|
758
|
+
.lean()
|
|
759
|
+
.exec(cb);
|
|
760
|
+
|
|
761
|
+
};
|
|
762
|
+
|
|
751
763
|
Person.statics.getFlags = function getFlags(personId, cb) {
|
|
752
764
|
|
|
753
765
|
var self = this;
|
package/package-lock.json
CHANGED