feat: add where are more items problem
This commit is contained in:
36
app/schemas/grade_1/where_are_more_items.py
Normal file
36
app/schemas/grade_1/where_are_more_items.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field, PositiveInt
|
||||
|
||||
|
||||
class PictureAsset(BaseModel):
|
||||
id: str = Field(min_length=1)
|
||||
name: str = Field(min_length=1)
|
||||
image_path: str = Field(min_length=1)
|
||||
|
||||
|
||||
class ItemGroup(BaseModel):
|
||||
side: Literal["left", "right"]
|
||||
picture: PictureAsset
|
||||
quantity: PositiveInt
|
||||
|
||||
|
||||
class MoreItemsComparison(BaseModel):
|
||||
position: PositiveInt
|
||||
left_group: ItemGroup
|
||||
right_group: ItemGroup
|
||||
answer_side: Literal["left", "right"]
|
||||
has_answer_box: bool = True
|
||||
|
||||
|
||||
class WhereAreMoreItemsProblem(BaseModel):
|
||||
instructions: str = "Marca dónde hay más."
|
||||
comparisons: list[MoreItemsComparison]
|
||||
|
||||
|
||||
class WhereAreMoreItemsRequest(BaseModel):
|
||||
available_pictures: list[PictureAsset] = Field(min_length=1)
|
||||
comparison_count: PositiveInt = 3
|
||||
min_quantity: PositiveInt = 1
|
||||
max_quantity: PositiveInt = 10
|
||||
seed: int | None = None
|
||||
Reference in New Issue
Block a user