@dhyasama/totem-models 7.24.0 → 7.26.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/index.js CHANGED
@@ -63,6 +63,7 @@ var bootstrap = function(mongoose, config) {
63
63
  require('./lib/List.js')(mongoose, config);
64
64
  require('./lib/Message.js')(mongoose, config);
65
65
  require('./lib/News.js')(mongoose, config);
66
+ require('./lib/SheetSync.js')(mongoose, config);
66
67
  require('./lib/Snapshot.js')(mongoose, config);
67
68
  require('./lib/Webhook.js')(mongoose, config);
68
69
 
package/lib/Round.js CHANGED
@@ -150,6 +150,7 @@ module.exports = function(mongoose, config) {
150
150
  // construct the org
151
151
  var org = {
152
152
  _id: rounds[0].organization._id,
153
+ slug: rounds[0].organization.slug,
153
154
  name: rounds[0].organization.name,
154
155
  logoUrl: rounds[0].organization.logoUrl,
155
156
  description: rounds[0].organization.description,
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ module.exports = function(mongoose, config) {
4
+
5
+ var
6
+
7
+ Schema = mongoose.Schema,
8
+ env = process.env.NODE_ENV || 'development',
9
+ _ = require('underscore');
10
+
11
+ var SheetSync = new Schema({
12
+ customer: { type: String, required: true },
13
+ uuid: { type: String, required: true },
14
+ syncedOn: { type: Date, required: true },
15
+ syncedBy: { type: String, trim: true },
16
+ errors: [{
17
+ step: { type: String },
18
+ message: { type: String }
19
+ }]
20
+ });
21
+
22
+ SheetSync.statics.upsert = function(sheetsync, cb) {
23
+ sheetsync.createdOn = new Date();
24
+ sheetsync.save(cb);
25
+ };
26
+
27
+ SheetSync.set('autoIndex', false);
28
+
29
+ mongoose.model('SheetSync', SheetSync);
30
+
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "7.24.0",
3
+ "version": "7.26.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
package/.npmignore DELETED
@@ -1,14 +0,0 @@
1
- lib-cov
2
- *.seed
3
- *.log
4
- *.csv
5
- *.dat
6
- *.out
7
- *.pid
8
- *.gz
9
-
10
- npm-debug.log
11
- node_modules
12
-
13
- .DS_Store
14
- .idea