feat:更新菜谱表单
This commit is contained in:
@@ -161,6 +161,29 @@ class Recipe {
|
||||
factory Recipe.fromJson(Map<String, dynamic> json) => _$RecipeFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$RecipeToJson(this);
|
||||
|
||||
static Recipe getEmpty() {
|
||||
return Recipe(
|
||||
id: 0,
|
||||
name: '',
|
||||
category: '家常菜',
|
||||
recommendRate: 3,
|
||||
remark: '',
|
||||
isShare: true,
|
||||
userId: 0,
|
||||
username: '',
|
||||
avatar: '',
|
||||
materialList: [],
|
||||
stepList: [],
|
||||
recordList: [],
|
||||
likeList: [],
|
||||
likeCount: 0,
|
||||
favouriteList: [],
|
||||
favouriteCount: 0,
|
||||
commentList: [],
|
||||
commentCount: 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
|
||||
Reference in New Issue
Block a user