Open venmer opened 6 years ago
DB schema should be verified. After discussion about user id info in Room and Guest tables I'd like to suggest add user_id field to Guest, because I think it makes sense to keep info about User who creates guest or change their info later. About rooms: state is not relevant for room as for static instance (in general), state is more relevant for booking as a room state in particular time period, and I think that Booking can be extended by state field from Room, which means room state in specified time period. Also in this case user id will be saved as a marker for indicating who created this state. @venmer , what do you think?
TODO: was decided to add user_id
FK field to Guest and Booking tables. state
field will be removed from Room table, actual room state depends on current booking.
Booking table will be extended with an optional field - description
TODO: Add state
to User instance as active/inactive indicator.
implemented under #10
@venmer, I think that room can't be permanently deleted as well as user, and room should have state
for active/inactive state. What do you think?
Also in case state
=inactive, room is unavailable for booking creation.
@Bright-Head, agreed. Room table will be extended with state=(active,inactive)
as well.
included in #10
@Bright-Head, please correct relations between GuestToBooking
and Guest
entities
Database schema has been added to repo. Need to be reviewed and approved.