feat: deal attributes editing
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user