Revert "Rename everything filcnaplo-related to refilc"
This reverts commit d1a9625d93.
This commit is contained in:
28
filcnaplo_kreta_api/lib/models/event.dart
Normal file
28
filcnaplo_kreta_api/lib/models/event.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
class Event {
|
||||
Map? json;
|
||||
String id;
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
String title;
|
||||
String content;
|
||||
|
||||
Event({
|
||||
required this.id,
|
||||
required this.start,
|
||||
required this.end,
|
||||
this.title = "",
|
||||
this.content = "",
|
||||
this.json,
|
||||
});
|
||||
|
||||
factory Event.fromJson(Map json) {
|
||||
return Event(
|
||||
id: json["Uid"] ?? "",
|
||||
start: json["ErvenyessegKezdete"] != null ? DateTime.parse(json["ErvenyessegKezdete"]).toLocal() : DateTime(0),
|
||||
end: json["ErvenyessegVege"] != null ? DateTime.parse(json["ErvenyessegVege"]).toLocal() : DateTime(0),
|
||||
title: json["Cim"] ?? "",
|
||||
content: json["Tartalom"] != null ? json["Tartalom"].replaceAll("\r", "") : "",
|
||||
json: json,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user