Reservation constructor

const Reservation({
  1. required int id,
  2. @JsonKey(name: 'slotid') required int slotId,
  3. @ReservationDateTimeConverter() required DateTime date,
  4. @JsonKey(name: 'userid') required int userId,
  5. @JsonKey(name: 'reserverid') required int reserverId,
})

A reservation for a Slot.

Implementation

const factory Reservation({
  /// Unique identifier of this reservation.
  required int id,

  /// The id of the slot this reservation is for.
  @JsonKey(name: 'slotid') required int slotId,

  /// The date of this reservation.
  @ReservationDateTimeConverter() required DateTime date,

  /// The id of this reservation is for.
  @JsonKey(name: 'userid') required int userId,

  /// The id of the user that made this reservation.
  @JsonKey(name: 'reserverid') required int reserverId,
}) = _Reservation;