bookingSchema.js 447 B

1234567891011121314151617181920212223
  1. import mongoose from "mongoose";
  2. const bookingSchema = new mongoose.Schema({
  3. appointment: {
  4. type: String,
  5. required: true
  6. },
  7. email: {
  8. type: String,
  9. required: true
  10. },
  11. firstname: {
  12. type: String,
  13. required: true
  14. },
  15. lastname: {
  16. type: String,
  17. required: true
  18. }
  19. });
  20. const Booking = mongoose.model('Booking', bookingSchema, 'booking');
  21. export default Booking;