Skip to content

Commit

Permalink
Remove event reservations from firebase and subcollection
Browse files Browse the repository at this point in the history
* Note that `Event.max_occupancy` is kept as this could still be useful.

* Also note that `FirestoreSubcollections.ts` was kept as this could be used in the future.

* Also removed the event request for signup
  • Loading branch information
jeffplays2005 committed Oct 7, 2024
1 parent b509da1 commit 7204ccb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
7 changes: 1 addition & 6 deletions server/src/data-layer/adapters/FirestoreSubcollections.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// credit https://plainenglish.io/blog/using-firestore-with-typescript-in-the-v9-sdk-cf36851bb099
import "dotenv/config"
import firestore from "./Firestore"
import { EventReservation } from "data-layer/models/firebase"

const FirestoreSubcollections = {
reservations: (eventId: string) =>
firestore.subcollection<EventReservation>("events", eventId, "reservations")
} as const
const FirestoreSubcollections = {} as const

export default FirestoreSubcollections
24 changes: 0 additions & 24 deletions server/src/data-layer/models/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,30 +130,6 @@ export interface BookingChange {
new_check_out: Timestamp // New check-out timestamp
}

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
/**
* This is the timestamp of when the reservation was made
*/
timestamp: Timestamp
}

export interface Event {
/**
* The title of this event
Expand Down
7 changes: 1 addition & 6 deletions server/src/service-layer/request-models/EventRequests.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { EventReservation, Event } from "data-layer/models/firebase"

export interface EventSignupBody {
event_id: string
reservation: Omit<EventReservation, "timestamp">
}
import { Event } from "data-layer/models/firebase"

export interface CreateEventBody {
data: Event
Expand Down

0 comments on commit 7204ccb

Please sign in to comment.