@dhyasama/totem-models 7.33.0 → 7.35.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/Investment.js +5 -1
- package/lib/Organization.js +2 -0
- package/package.json +1 -1
package/lib/Investment.js
CHANGED
|
@@ -63,7 +63,7 @@ module.exports = function(mongoose, config) {
|
|
|
63
63
|
// Catch-all for customer specific key-value pairs from sheet that aren't supported by our schema
|
|
64
64
|
details: [{
|
|
65
65
|
key: { type: String, trim: true, required: true },
|
|
66
|
-
value: { type:
|
|
66
|
+
value: { type: Schema.Types.Mixed, required: true },
|
|
67
67
|
format: { type: String, enum: [null, 'number', 'decimal', 'money', 'percentage', 'date']},
|
|
68
68
|
_id: false
|
|
69
69
|
}],
|
|
@@ -130,6 +130,10 @@ module.exports = function(mongoose, config) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
Investment.statics.upsert = function upsert(investment, cb) {
|
|
133
|
+
|
|
134
|
+
// Required for mixed types
|
|
135
|
+
investment.markModified('details');
|
|
136
|
+
|
|
133
137
|
if (!investment) { return cb(new Error('investment is required'), null); }
|
|
134
138
|
investment.save(cb);
|
|
135
139
|
};
|
package/lib/Organization.js
CHANGED
|
@@ -173,6 +173,8 @@ module.exports = function(mongoose, config) {
|
|
|
173
173
|
|
|
174
174
|
totemUrl: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
|
|
175
175
|
|
|
176
|
+
currency: { type: String, default: 'USD', trim: true },
|
|
177
|
+
|
|
176
178
|
beanstalk: {
|
|
177
179
|
environmentName: { type: String, trim: true },
|
|
178
180
|
restartOnPull: { type: Boolean, default: true }
|