Files
math-problems-structure/app/schemas/grade_1/subtract_with_image_reference.py
2026-05-26 14:58:56 -04:00

41 lines
1.1 KiB
Python

from pydantic import BaseModel, Field, NonNegativeInt, PositiveInt
class PictureAsset(BaseModel):
id: str = Field(min_length=1)
name: str = Field(min_length=1)
image_path: str = Field(min_length=1)
class SubtractionEquation(BaseModel):
initial_quantity: PositiveInt
removed_quantity: PositiveInt
remaining_quantity: NonNegativeInt
symbol: str = "-"
equals_symbol: str = "="
class FigureGroup(BaseModel):
label: str = Field(min_length=1)
quantity: NonNegativeInt
picture: PictureAsset
class SubtractWithImageReferenceProblem(BaseModel):
title: str = "¿Cuántos quedan?"
question: str
object_name: str = Field(min_length=1)
actor_name: str = Field(min_length=1)
figure: PictureAsset
remaining_group: FigureGroup
subtracted_group: FigureGroup
equation: SubtractionEquation
class SubtractWithImageReferenceRequest(BaseModel):
object_name: str = Field(min_length=1)
initial_quantity: PositiveInt
removed_quantity: PositiveInt
figure: PictureAsset
actor_name: str = Field(default="Diego", min_length=1)