feat: deal attributes with select and options

This commit is contained in:
2025-10-29 19:37:27 +04:00
parent 0e8c9077c9
commit 82fcd6e8cb
14 changed files with 206 additions and 23 deletions

43
schemas/attr_select.py Normal file
View File

@ -0,0 +1,43 @@
from typing import Any
from schemas.base import BaseSchema
# region Entity
class AttrSelectSchema(BaseSchema):
id: int
label: str
is_built_in: bool
class AttrOptionSchema(BaseSchema):
id: int
label: str
value: Any
class AttrSelectWithOptionsSchema(AttrSelectSchema):
options: list[AttrOptionSchema]
# endregion
# region Request
# endregion
# region Response
class GetAllAttrSelectsResponse(BaseSchema):
items: list[AttrSelectSchema]
class GetAllAttrSelectOptionsResponse(BaseSchema):
items: list[AttrOptionSchema]
# endregion