feat:增加博客搜索功能
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user