AvailabilitySchedule

data class AvailabilitySchedule(var availableDates: List<String> = emptyList(), var bookedDates: List<String> = emptyList())

Represents the availability schedule for a set of dates.

Constructors

Link copied to clipboard
constructor(availableDates: List<String> = emptyList(), bookedDates: List<String> = emptyList())

Properties

Link copied to clipboard

Dates that are set to be available for booking by the owner.

Link copied to clipboard

Dates that have already been booked.

Functions

Link copied to clipboard

Adds dates to the schedule's available dates.

Link copied to clipboard

Cancels bookings for the specified dates.

Link copied to clipboard

Returns a list of dates that are not booked of the available dates (free), in order.

Link copied to clipboard

Gets the set of available dates of type LocalDate. Dates are converted from ISO date strings (compatible with firestore) to LocalDate.

Link copied to clipboard

Gets the set of booked dates of type LocalDate. Dates are converted from ISO date strings (compatible with firestore) to LocalDate.

Link copied to clipboard

Checks whether the list of dates are available and not booked.

Link copied to clipboard

Marks specified dates as booked if they are available. Dates outside the availability schedule are ignored.

Link copied to clipboard

Removes dates from the schedule's available dates.