/***
 *
 * @description This model represent the gym services collection schema in mongodb
 * * source : https://mongoosejs.com/docs/guide.html
 */
import mongoose, { Model } from 'mongoose';
import { IEquipmentSchema } from '@/types/IDB';
// define the schema
const equipmentSchema = new mongoose.Schema<IEquipmentSchema>({
    name: String,
    description: String,
    addedAt: Number,
    quantity: Number,
    sallerName: String,
    sallerAddress: String,
    sallerPhone: String,
    singlePrice: Number,
}, { timestamps: true });
// export the model
const equipmentModel: Model<IEquipmentSchema> = mongoose.models.equipments || mongoose.model<IEquipmentSchema>('equipments', equipmentSchema);
export default equipmentModel