Lottery Repository
class LotteryRepository
Handles the data in the Firestore database for the Lottery class.
Properties
Functions
Link copied to clipboard
Adds a new lottery to the Firestore database.
Link copied to clipboard
Adds a waitlist entry to a specified lottery if there is enough space left.
Link copied to clipboard
Deletes a lottery from the Firestore database.
Link copied to clipboard
Gets all Lottery that is created by a specific campsite.
Link copied to clipboard
Gets a Lottery object from the database given its lotteryId.
Link copied to clipboard
Link copied to clipboard
Removes a waitlist entry from a specified lottery. If the waitlist entry is not in the lottery, the function does nothing.
Link copied to clipboard
Saves a lottery to Firestore, creating it if absent.