feat:增加博客搜索功能

This commit is contained in:
2025-11-16 21:56:26 +08:00
parent 47b6fb9937
commit 61922cbcd8
7 changed files with 298 additions and 34 deletions

View File

@@ -107,3 +107,30 @@ class BlogStats {
Map<String, dynamic> toJson() => _$BlogStatsToJson(this);
}
@JsonSerializable(genericArgumentFactories: true)
class BlogSearch {
@JsonKey(name: 'id')
final int id;
@JsonKey(name: 'title')
final String title;
@JsonKey(name: 'content')
final String content;
@JsonKey(name: 'highlight')
final String highlight;
const BlogSearch({
required this.id,
required this.title,
required this.content,
required this.highlight,
});
factory BlogSearch.fromJson(Map<String, dynamic> json) =>
_$BlogSearchFromJson(json);
Map<String, dynamic> toJson() => _$BlogSearchToJson(this);
}