forked from eatvio/eatvio_app
24 lines
498 B
Dart
24 lines
498 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import './photo.dart';
|
|
import './portion.dart';
|
|
|
|
part 'meal.freezed.dart';
|
|
|
|
part 'meal.g.dart';
|
|
|
|
@freezed
|
|
class Meal with _$Meal {
|
|
const factory Meal({
|
|
required int id,
|
|
required String time,
|
|
required int type,
|
|
required int satiety,
|
|
required int mood,
|
|
required List<Portion> portions,
|
|
required List<Photo> photos,
|
|
}) = _Meal;
|
|
|
|
factory Meal.fromJson(Map<String, Object?> json) => _$MealFromJson(json);
|
|
}
|