@dhyasama/totem-models 5.8.2 → 5.9.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/Deal.js CHANGED
@@ -41,7 +41,7 @@ module.exports = function(mongoose, config) {
41
41
 
42
42
  resources: [{
43
43
  title: { type: String, trim: true, required: true },
44
- link: { type: String, trim: true, required: true },
44
+ link: { type: String, trim: true, required: true }
45
45
  }],
46
46
 
47
47
  history: [{
@@ -49,6 +49,12 @@ module.exports = function(mongoose, config) {
49
49
  account: { type: Schema.ObjectId, ref: 'Account', required: true },
50
50
  stage: { type: String, required: true },
51
51
  description: { type: String, trim: true, required: true }
52
+ }],
53
+
54
+ votes: [{
55
+ timestamp: { type: Date, required: true, default: Date.now },
56
+ account: { type: Schema.ObjectId, ref: 'Account', required: true },
57
+ value: { type: Number }
52
58
  }]
53
59
 
54
60
  });
@@ -208,7 +208,14 @@ module.exports = function(mongoose, config) {
208
208
  name: { type: String, trim: true },
209
209
  order: { type: Number },
210
210
  active: { type: Boolean, default: true }
211
- }]
211
+ }],
212
+ voting: {
213
+ active: { type: Boolean, default: true },
214
+ categories: [{
215
+ name: { type: String, trim: true },
216
+ value: { type: Number }
217
+ }]
218
+ }
212
219
  }
213
220
 
214
221
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "5.8.2",
3
+ "version": "5.9.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",