@dhyasama/totem-models 12.29.0 → 12.31.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/Financials.js +11 -2
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -120,6 +120,12 @@ module.exports = function(mongoose, config) {
|
|
|
120
120
|
type: Schema.Types.ObjectId,
|
|
121
121
|
refPath: 'metrics.sources.model',
|
|
122
122
|
},
|
|
123
|
+
// On a derived/formula metric, the formula component (group) this
|
|
124
|
+
// cell belongs to — "this cell is part of Operating Expenses".
|
|
125
|
+
// Component totals live once per metric in `breakdown`
|
|
126
|
+
// ({ group: value }), keyed by these group names. Unset on raw
|
|
127
|
+
// extracted metrics.
|
|
128
|
+
group: { type: String, trim: true },
|
|
123
129
|
position: {
|
|
124
130
|
_id: false,
|
|
125
131
|
page: { type: Number },
|
|
@@ -149,7 +155,9 @@ module.exports = function(mongoose, config) {
|
|
|
149
155
|
_id: false,
|
|
150
156
|
timestamp: { type: Date, required: true, default: Date.now },
|
|
151
157
|
user: { type: String, trim: true, required: true },
|
|
152
|
-
|
|
158
|
+
// 'confirmed' = a re-extraction found the identical value: freshness signal only,
|
|
159
|
+
// never a change — it does not touch value or verified state.
|
|
160
|
+
action: { type: String, enum: ['updated', 'deleted', 'verified', 'confirmed'], required: true },
|
|
153
161
|
}],
|
|
154
162
|
previous: {
|
|
155
163
|
_id: false,
|
|
@@ -162,6 +170,7 @@ module.exports = function(mongoose, config) {
|
|
|
162
170
|
_id: false,
|
|
163
171
|
model: { type: String, enum: ['Document', 'Meeting', 'Message', 'Note'] },
|
|
164
172
|
ref: { type: Schema.Types.ObjectId },
|
|
173
|
+
group: { type: String, trim: true },
|
|
165
174
|
position: {
|
|
166
175
|
_id: false,
|
|
167
176
|
page: { type: Number },
|
|
@@ -188,7 +197,7 @@ module.exports = function(mongoose, config) {
|
|
|
188
197
|
_id: false,
|
|
189
198
|
timestamp: { type: Date },
|
|
190
199
|
user: { type: String, trim: true },
|
|
191
|
-
action: { type: String, enum: ['updated', 'deleted', 'verified'] },
|
|
200
|
+
action: { type: String, enum: ['updated', 'deleted', 'verified', 'confirmed'] },
|
|
192
201
|
}]
|
|
193
202
|
}
|
|
194
203
|
}],
|