const mongoose = require('mongoose');

const reservationSchema = new mongoose.Schema({
  fullName: {
    type: String,
    required: true,
  },
  phone: {
    type: String,
    required: true,
  },
  email: {
    type: String,
    required: true,   
  },
  date: {
    type: String, // e.g., '2025-08-26'
    required: true
  },
  time: {
    type: String, // e.g., '19:00'
    required: true
  },
  guests: {
    type: Number,
    required: true
  },
  description: {
    type: String,
    default: ''
  },
  created_at:{
    type: Date,
    required: true,
    default: Date.now,
  }
});

module.exports = mongoose.model('Reservation', reservationSchema);
