This commit is contained in:
zhutao
2025-08-22 14:15:02 +08:00
parent 5853bdf004
commit 99a1ce601e
120 changed files with 5297 additions and 101 deletions

View File

@@ -0,0 +1,33 @@
class ArticleDetailDto {
int? id;
String? title;
String? subtitle;
String? content;
int? status;
String? createdAt;
String? updatedAt;
ArticleDetailDto({this.id, this.title, this.subtitle, this.content, this.status, this.createdAt, this.updatedAt});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["title"] = title;
map["subtitle"] = subtitle;
map["content"] = content;
map["status"] = status;
map["created_at"] = createdAt;
map["updated_at"] = updatedAt;
return map;
}
ArticleDetailDto.fromJson(dynamic json){
id = json["id"] ?? 0;
title = json["title"] ?? "";
subtitle = json["subtitle"] ?? "";
content = json["content"] ?? "";
status = json["status"] ?? 0;
createdAt = json["created_at"] ?? "";
updatedAt = json["updated_at"] ?? "";
}
}