From 6ecf859102f32c70031c5bcd9f1293b610a554be Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Mon, 24 Jul 2023 23:01:01 +0200 Subject: [PATCH] added missing Payment model --- src/models/Payment.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/models/Payment.ts diff --git a/src/models/Payment.ts b/src/models/Payment.ts new file mode 100644 index 0000000..391907d --- /dev/null +++ b/src/models/Payment.ts @@ -0,0 +1,15 @@ +import mongoose from 'mongoose'; + +const PaymentSchema= new mongoose.Schema( + { + payee: {type: String, required: true}, + amount: {type: Number, required: true}, + for_self: {type: Number}, + for_other: {type: Number}, + description: {type: String}, + added_by: {type: String}, + date: {type: Date, required: true, default: Date.now}, + }, {timestamps: true} +); + +export const Payment = mongoose.model("Payment", PaymentSchema);