diff --git a/server/src/data-layer/models/firebase.ts b/server/src/data-layer/models/firebase.ts index cdbb02e1d..c230d47c7 100644 --- a/server/src/data-layer/models/firebase.ts +++ b/server/src/data-layer/models/firebase.ts @@ -130,7 +130,27 @@ export interface BookingChange { new_check_out: Timestamp // New check-out timestamp } -export interface EventSlot { +export interface EventReservation { + /** + * The first name of the user who made this event reservation + */ + first_name: string + /** + * The last name of the user who made this event reservation + */ + last_name: string + /** + * The email of the user who made this even reservation + */ + email: string + /** + * Boolean to check if the user is a member + * @example true + */ + is_member: boolean +} + +export interface Event { /** * The title of this event * @example Snowboarding race! @@ -166,28 +186,9 @@ export interface EventSlot { * @example 30 */ max_occupancy?: number -} - -export interface EventReservation { - /** - * The first name of the user who made this event reservation - */ - first_name: string - /** - * The last name of the user who made this event reservation - */ - last_name: string - /** - * The email of the user who made this even reservation - */ - email: string - /** - * Boolean to check if the user is a member - * @example true - */ - is_member: boolean /** - * A link from EventReservation -> EventSlot + * Subcollection of EventReservation interface. + * Holds the members that made a reservation to this event */ - event_slot: string + reservations: EventReservation[] }