May be in the "bookings" table you have a "confirmed_booking_date_id" column. Another option is to add a "confirmed_flg" column to the "booking_dates" table.
Feb 16, 2018
2
Level 3
Best way to set up confirmation for 1 date out of multiple dates
I'm creating a tour guide booking site the guide needs the site to allow the user to select 3 dates then the owner will confirm a date.
I have set up 3 Models
- Tour
- Date
- Booking
My tables are
- Tours
- Dates
- Bookings
- Bookings_Dates
The relationships are
- Tour has many Dates
- Date belongs To Tour
- Date has many Bookings
- Booking has many Dates
When the user creates a booking it also creates 3 entries in the bookings_dates table.
What i'm trying to think through is what is the best way for the the guide to confirm 1 of the dates on the bookings?
I was thinking that when the guide confirms 1 of the dates the other 2 dates from the booking_dates table are removed.
Wondering if you guys have any advice?
Level 7
Please or to participate in this conversation.