Skip to content

Commit

Permalink
Change EventReservation to subcollection
Browse files Browse the repository at this point in the history
Changed EventSlot -> Event

* Adds clarity as there is no longer a need for a "slot"
  • Loading branch information
jeffplays2005 committed Jul 29, 2024
1 parent d74dd31 commit 78c99e5
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions server/src/data-layer/models/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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[]
}

0 comments on commit 78c99e5

Please sign in to comment.