added missing Payment model

This commit is contained in:
Alexander Bocken 2023-07-24 23:01:01 +02:00
parent 6356456a18
commit 6ecf859102
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

15
src/models/Payment.ts Normal file
View File

@ -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);