Files
Crm-Backend/schemas/attr_select.py

44 lines
583 B
Python

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