Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotel Management System - Python - Unique Booking for a Room fails #31

Open
akshatanand186 opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@akshatanand186
Copy link

The status attribute associated with the class Room, makes it unavailable for other bookings if the Booking period does not collide with the previous booked rooms.

Let's say I say booked Room 1 for 13-09 till 15-09, now the status of this Room is made BOOKED, and if another guest tries to make a booking from 17-09 till 22-09, he is not allowed to book.

I'm not sure if this behaviour is expected but there can be some solutions to this problem.
Possible Solution: creating another map to store datewise bookings for a room

Pros: cancel bookings, make bookings, checking valid booking requests can be easy.

Cons: not sure if this is best design practise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant