from os import read
from django.contrib.auth.models import User, Group
from rest_framework import serializers

import recipe.models

class RecipeSerializer(serializers.ModelSerializer):
  id = serializers.IntegerField(read_only=True)
  class Meta:
    model = recipe.models.Recipe
    fields = '__all__'


class WeekRecipeSerializer(serializers.ModelSerializer):

  class Meta:
    model = recipe.models.DailyRecipe
    fields = '__all__'


class DailyRecipeSerializer(serializers.ModelSerializer):
  id = serializers.IntegerField(read_only=True)
  recipes = RecipeSerializer(many=True)
  class Meta:
    model = recipe.models.DailyRecipe
    fields = '__all__'
