27 lines
1.0 KiB
Dart
27 lines
1.0 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
import '../mhslApi.dart';
|
|
|
|
part 'customTimetableEvent.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class CustomTimetableEvent {
|
|
String id;
|
|
String title;
|
|
String description;
|
|
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
|
|
DateTime startDate;
|
|
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
|
|
DateTime endDate;
|
|
String rrule;
|
|
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
|
|
DateTime createdAt;
|
|
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
|
|
DateTime updatedAt;
|
|
|
|
CustomTimetableEvent({required this.id, required this.title, required this.description, required this.startDate,
|
|
required this.endDate, required this.rrule, required this.createdAt, required this.updatedAt});
|
|
|
|
factory CustomTimetableEvent.fromJson(Map<String, dynamic> json) => _$CustomTimetableEventFromJson(json);
|
|
Map<String, dynamic> toJson() => _$CustomTimetableEventToJson(this);
|
|
} |