feat:增加博客分类模块

This commit is contained in:
2025-11-15 13:03:10 +08:00
parent 3b167508dd
commit 2cfb2ce592
19 changed files with 901 additions and 201 deletions

View File

@@ -59,4 +59,20 @@ class Blog {
factory Blog.fromJson(Map<String, dynamic> json) => _$BlogFromJson(json);
Map<String, dynamic> toJson() => _$BlogToJson(this);
}
}
@JsonSerializable()
class BlogCategory {
@JsonKey(name: 'name')
final String name;
@JsonKey(name: 'count')
final int count;
BlogCategory({required this.name, required this.count});
factory BlogCategory.fromJson(Map<String, dynamic> json) =>
_$BlogCategoryFromJson(json);
Map<String, dynamic> toJson() => _$BlogCategoryToJson(this);
}