import mongoose from "mongoose"; const bookingInputSchema = new mongoose.Schema({ name: { type: String, required: true }, value: { type: mongoose.Schema.Types.Mixed, required: true }, // Can be string, number, etc. }, {_id: false}); const bookingSchema = new mongoose.Schema({ appointment: { type: String, required: true }, time: { type: Date, required: true }, inputs: [bookingInputSchema] }); const Booking = mongoose.model('Booking', bookingSchema, 'booking'); export default Booking;