这是我的模特
const DoctorSchema=mongoose.Schema({
ds:[{day:String,timeSlots:[{time:String,status:Boolean}]}],
hospital:{type:mongoose.Schema.ObjectId,ref:'Hospital',required:true},
city:{type:[String],index:true},
addedAt:{type:Date,default:Date.now}
})
ds字段是医生的日期字段。在病人之后 预订一个时隙,然后指定那个时隙的状态 应将天设为假,以使其他患者不能预订相同的书 时间段。ds域是包含日域和 时隙数组,其中时隙是可用于 特定的一天
ds:[{day,that days时隙数组}]