# Exercise 1 Solution
from pydantic import BaseModel, Field
from typing import List


class Ingredient(BaseModel):
    naam: str
    hoeveelheid: str


class Recept(BaseModel):
    titel: str = Field(..., min_length=3)
    personen: int = Field(..., gt=0)
    ingredienten: List[Ingredient]
    stappen: List[str] = Field(..., min_length=2)


recept = Recept(
    titel="Pannenkoeken",
    personen=4,
    ingredienten=[
        Ingredient(naam="bloem", hoeveelheid="250 gram"),
        Ingredient(naam="melk", hoeveelheid="500 ml"),
    ],
    stappen=["Meng de ingrediënten.", "Bak de pannenkoeken goudbruin."],
)
print(recept.model_dump_json(indent=2))
