22 lines
430 B
Dart
22 lines
430 B
Dart
class DailyTipDto {
|
|
int? id;
|
|
String? title;
|
|
String? content;
|
|
|
|
DailyTipDto({this.id, this.title, this.content});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map["id"] = id;
|
|
map["title"] = title;
|
|
map["content"] = content;
|
|
return map;
|
|
}
|
|
|
|
DailyTipDto.fromJson(dynamic json) {
|
|
id = json["id"] ?? 0;
|
|
title = json["title"] ?? "";
|
|
content = json["content"] ?? "";
|
|
}
|
|
}
|