feat: create structure for the project and first problem
This commit is contained in:
0
app/schemas/grade_1/__init__.py
Normal file
0
app/schemas/grade_1/__init__.py
Normal file
35
app/schemas/grade_1/join_pictures_with_quantity.py
Normal file
35
app/schemas/grade_1/join_pictures_with_quantity.py
Normal file
@@ -0,0 +1,35 @@
|
||||
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 PictureContainer(BaseModel):
|
||||
position: PositiveInt
|
||||
quantity: PositiveInt
|
||||
picture: PictureAsset
|
||||
|
||||
|
||||
class NumberCard(BaseModel):
|
||||
position: PositiveInt
|
||||
value: PositiveInt
|
||||
shows_blocks: bool = True
|
||||
has_answer_box: bool = True
|
||||
|
||||
|
||||
class JoinPicturesWithQuantityProblem(BaseModel):
|
||||
instructions: str = "Cuenta las imágenes y une cada grupo con el número correcto."
|
||||
left_containers: list[PictureContainer]
|
||||
number_cards: list[NumberCard]
|
||||
right_containers: list[PictureContainer]
|
||||
|
||||
|
||||
class JoinPicturesWithQuantityRequest(BaseModel):
|
||||
available_pictures: list[PictureAsset] = Field(min_length=1)
|
||||
container_count_per_side: PositiveInt = 5
|
||||
min_quantity: PositiveInt = 1
|
||||
max_quantity: PositiveInt = 10
|
||||
seed: int | None = None
|
||||
Reference in New Issue
Block a user