@dhyasama/totem-models 5.10.6 → 5.10.7

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/Deal.js CHANGED
@@ -60,7 +60,9 @@ module.exports = function(mongoose, config) {
60
60
  timestamp: { type: Date, required: true, default: Date.now },
61
61
  person: { type: Schema.ObjectId, ref: 'Person', required: true },
62
62
  value: { type: Number }
63
- }]
63
+ }],
64
+
65
+ sectors: [{ type: String, trim: true }]
64
66
 
65
67
  });
66
68
 
@@ -249,22 +251,6 @@ module.exports = function(mongoose, config) {
249
251
  });
250
252
  };
251
253
 
252
- Deal.statics.addVote = function(dealId, personId, vote, cb) {
253
-
254
- var self = this;
255
-
256
- self.findByIdAndUpdate(dealId, {$push:
257
- {
258
- votes: {
259
- timestamp: new Date(),
260
- person: personId,
261
- value: vote
262
- }
263
- }
264
- }, cb);
265
-
266
- };
267
-
268
254
  Deal.statics.upsert = function upsert(deal, user, cb) {
269
255
 
270
256
  // Deal is dumb and doesn't validate customer stages or duplicate deals. That responsibility is with the org.
@@ -215,6 +215,9 @@ module.exports = function(mongoose, config) {
215
215
  name: { type: String, trim: true },
216
216
  value: { type: Number }
217
217
  }]
218
+ },
219
+ sectors: {
220
+ active: { type: Boolean, default: false }
218
221
  }
219
222
  }
220
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "5.10.6",
3
+ "version": "5.10.7",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",