Added api for custom timetable events
This commit is contained in:
28
lib/api/mhsl/customTimetableEvent/customTimetableEvent.dart
Normal file
28
lib/api/mhsl/customTimetableEvent/customTimetableEvent.dart
Normal file
@ -0,0 +1,28 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user