Agromind-backend / backend /models /appointmentModel.js
gh-action-hf-auto
auto: sync backend from github@32fb9685
8a6248c
import mongoose from 'mongoose'
const appointmentSchema = new mongoose.Schema({
farmerId: {
type: mongoose.Schema.Types.ObjectId, ref: 'User',required: true
},
expertId:{
type: mongoose.Schema.Types.ObjectId, ref: 'User',required: true
},
status:{
type: String,
enum:[
'pending', 'accepted', 'declined'
],
default: 'pending'
},
date:{
type: Date,
default: Date.now
}
}, {timestamps: true});
export default mongoose.model('Appointment', appointmentSchema);