1 files changed, 7 insertions, 8 deletions
diff --git a/src/db/schemas/spendHistory.js b/src/db/schemas/spendHistory.js
index b4c3f20..d1d6c2a 100644
--- a/src/db/schemas/spendHistory.js
+++ b/src/db/schemas/spendHistory.js
@@ -11,23 +11,22 @@ export const spendHistorySchema = new Schema(
required: true,
immutable: true
},
- items: {
- type: [String],
+ reason: {
+ type: String,
required: true,
immutable: true
},
- cost: {
+ amount: {
type: Number,
required: true,
immutable: true
- },
- createdAt: {
- type: Date,
- default: Date.now,
- immutable: true
}
},
{
+ timestamps: {
+ createdAt: true,
+ updatedAt: false
+ },
timeseries: {
timeField: 'createdAt'
}
|