Reservation constructor
const
Reservation({
- required String uid,
- required String subjectUid,
- required String objectType,
- required String objectUid,
- @JsonKey.new(fromJson: timestampListToDateTimeList, toJson: dateTimeListToTimestampList) @FormArrayAnnotation.new<dynamic>() @Default.new([]) List<
DateTime> reservedDateTimes, - @FormControlAnnotation.new<dynamic>() @ReservationStateConverter() ReservationState? reservationState,
- @JsonKey.new(fromJson: timestampToDateTime, toJson: dateTimeToTimestamp) required DateTime createdAt,
- @JsonKey.new(fromJson: timestampToDateTime, toJson: dateTimeToTimestamp) required DateTime updatedAt,
- @FormArrayAnnotation.new<dynamic>() List<
String> ? filePaths,
Implementation
const factory Reservation({
required String uid,
required String subjectUid,
required String objectType,
required String objectUid,
@JsonKey(
fromJson: timestampListToDateTimeList,
toJson: dateTimeListToTimestampList)
@RfArray()
@Default([])
List<DateTime> reservedDateTimes,
// @JsonSerializable(
// explicitToJson: true,
// converters: [ReservationStateConverter()],
// )
@RfControl()
@ReservationStateConverter()
ReservationState? reservationState,
@JsonKey(fromJson: timestampToDateTime, toJson: dateTimeToTimestamp)
required DateTime createdAt,
// required String updatedAt,
@JsonKey(fromJson: timestampToDateTime, toJson: dateTimeToTimestamp)
required DateTime updatedAt,
@RfArray() List<String>? filePaths,
}) = _Reservation;