forked from eatvio/eatvio_app
29 lines
769 B
Dart
29 lines
769 B
Dart
import 'package:eatvio_app/features/create_recipe/models/ingredient.dart';
|
|
import 'package:eatvio_app/features/create_recipe/models/step.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'recipe_model.freezed.dart';
|
|
|
|
part 'recipe_model.g.dart';
|
|
|
|
@freezed
|
|
class RecipeModel with _$RecipeModel {
|
|
const factory RecipeModel({
|
|
List<Ingredient?>? ingredients,
|
|
List<Step?>? steps,
|
|
List<String>? tags,
|
|
String? type,
|
|
String? state,
|
|
String? title,
|
|
String? description,
|
|
String? video_url,
|
|
String? image,
|
|
int? totalCookingTime,
|
|
int? activeCookTime,
|
|
int? servings,
|
|
int? energyPerServing,
|
|
}) = _RecipeModel;
|
|
|
|
factory RecipeModel.fromJson(Map<String, Object?> json) => _$RecipeModelFromJson(json);
|
|
}
|