Files
eatvio_app/lib/features/create_recipe/models/recipe_model.dart
2025-05-21 17:42:43 +03:00

29 lines
803 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
abstract class RecipeModel with _$RecipeModel {
const factory RecipeModel({
List<Ingredient?>? ingredients,
List<Step?>? steps,
List<String>? tags,
String? type,
String? state,
String? title,
String? description,
@JsonKey(name: 'video_url') String? videoUrl,
String? image,
int? totalCookingTime,
int? activeCookTime,
int? servings,
int? energyPerServing,
}) = _RecipeModel;
factory RecipeModel.fromJson(Map<String, Object?> json) => _$RecipeModelFromJson(json);
}