feat: deal attributes editing

This commit is contained in:
2025-10-27 10:02:02 +04:00
parent a579ae4145
commit 759a8d6478
6 changed files with 183 additions and 5 deletions

View File

@ -44,6 +44,25 @@ class ModuleAttributeSchema(AttributeSchema):
original_label: str
class DealModuleAttributeSchema(BaseSchema):
attribute_id: int
label: str
original_label: str
value: Optional[dict[str, Any]]
type: AttributeTypeSchema
default_value: dict[str, Any]
description: str
is_applicable_to_group: bool
is_shown_on_dashboard: bool
is_highlight_if_expired: bool
is_nullable: bool
class UpdateDealModuleAttributeSchema(BaseSchema):
attribute_id: int
value: Optional[dict[str, Any]]
# endregion
# region Request
@ -63,6 +82,9 @@ class UpdateAttributeLabelRequest(BaseSchema):
label: str
class UpdateDealModuleAttributesRequest(BaseSchema):
attributes: list[UpdateDealModuleAttributeSchema]
# endregion
# region Response
@ -92,4 +114,11 @@ class GetAllAttributeTypesResponse(BaseSchema):
items: list[AttributeTypeSchema]
class GetDealModuleAttributesResponse(BaseSchema):
attributes: list[DealModuleAttributeSchema]
class UpdateDealModuleAttributesResponse(BaseResponse):
pass
# endregion