Files
plan_flutter/lib/api/dto/daily_tip_dto.dart
2025-09-09 14:07:38 +08:00

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"] ?? "";
}
}