/***
 *
 * @description This model represent the gym services collection schema in mongodb
 * * source : https://mongoosejs.com/docs/guide.html
 */
import mongoose, { Model } from 'mongoose';
import { IIncomeSchema } from '@/types/IDB';
// define the schema
const incomeSchema = new mongoose.Schema<IIncomeSchema>({
    name: String,
    description: String,
    amount: Number,
    addedAt: Number,
}, { timestamps: true });
// export the model
const incomeModel: Model<IIncomeSchema> = mongoose.models.incomes || mongoose.model<IIncomeSchema>('incomes', incomeSchema);
export default incomeModel