forked from eatvio/eatvio_app
feat(diary): add gallery
This commit is contained in:
@@ -47,10 +47,10 @@ class MealModel with _$MealModel {
|
||||
@freezed
|
||||
class DiaryPhotoModel with _$DiaryPhotoModel {
|
||||
const factory DiaryPhotoModel({
|
||||
@JsonKey(name: "id") required String id,
|
||||
@JsonKey(name: "id") required int id,
|
||||
@JsonKey(name: "original_name") required String originalName,
|
||||
@JsonKey(name: "path") required String path,
|
||||
@JsonKey(name: "size") required String size,
|
||||
@JsonKey(name: "size") required int size,
|
||||
}) = _DiaryPhotoModel;
|
||||
|
||||
factory DiaryPhotoModel.fromJson(Map<String, dynamic> json) => _$DiaryPhotoModelFromJson(json);
|
||||
@@ -78,3 +78,14 @@ class TypeOfDiaryModel with _$TypeOfDiaryModel {
|
||||
|
||||
factory TypeOfDiaryModel.fromJson(Map<String, dynamic> json) => _$TypeOfDiaryModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class ProductInMeal with _$ProductInMeal {
|
||||
const factory ProductInMeal({
|
||||
@JsonKey(name: 'product_name') required String productName,
|
||||
@JsonKey(name: 'portion') required String portion,
|
||||
@JsonKey(name: 'quantity') required int quantity,
|
||||
}) = _ProductInMeal;
|
||||
|
||||
factory ProductInMeal.fromJson(Map<String, Object?> json) => _$ProductInMealFromJson(json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user