feat:增加博客统计模块
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user