Firestore Overview - Garasje-folka/bartstua GitHub Wiki
This is an overview of the different collections in our firestore database.
Reservations
Description
Contains all the reserved bookings. These are used for reserving space for an user that has made a booking, but not yet payed for it. A reservation lasts for 15 minutes and is removed from the collection when it expires. If the reservation is payed for in 15 minutes, it is deleted from the reservations collection and its data is moved to the bookings collection.
Document format
date
: The time of the event that has been bookeduid
: The id of the user that made the bookingspaces
: The number of spaces that was booked
Bookings
Description
Contains all the bookings that have been payed for.
Document format
date
: The time of the event that has been bookeduid
: The id of the user that made the bookingspaces
: The number of spaces that was booked
Events
Description
Contains information about all the events. NOTE that an event document is not added to the database before there has been made a reservation for that given event. The event documents are used to check if there is enough space left when making a reservation.
Document format
date
: The time of the eventspacesTaken
: The number of spaces taken for the event. This number can be no more than 10. NOTE that this number should always match the sum of booking and reservation spaces for the event