feat:增加博客统计模块

This commit is contained in:
2025-11-15 16:56:47 +08:00
parent 2cfb2ce592
commit d512a77f5f
22 changed files with 1196 additions and 524 deletions

View File

@@ -76,3 +76,34 @@ class BlogCategory {
Map<String, dynamic> toJson() => _$BlogCategoryToJson(this);
}
@JsonSerializable(genericArgumentFactories: true)
class BlogStats {
@JsonKey(name: 'blogCount')
final int blogCount;
@JsonKey(name: 'categoryCount')
final int categoryCount;
@JsonKey(name: 'greatCount')
final int greatCount;
@JsonKey(name: 'visitCount')
final int visitCount;
@JsonKey(name: 'wordCount')
final int wordCount;
const BlogStats({
required this.blogCount,
required this.categoryCount,
required this.greatCount,
required this.visitCount,
required this.wordCount,
});
factory BlogStats.fromJson(Map<String, dynamic> json) =>
_$BlogStatsFromJson(json);
Map<String, dynamic> toJson() => _$BlogStatsToJson(this);
}