fix: applied timezone to default values, removed value nesting

This commit is contained in:
2025-10-28 11:43:42 +04:00
parent c1196497d4
commit 9b109a7270
7 changed files with 80 additions and 62 deletions

View File

@ -16,7 +16,7 @@ class CreateAttributeSchema(BaseSchema):
label: str
is_applicable_to_group: bool
is_nullable: bool
default_value: Optional[dict[str, Any]]
default_value: Optional[Any]
description: str
type_id: int
@ -31,7 +31,7 @@ class UpdateAttributeSchema(BaseSchema):
label: Optional[str] = None
is_applicable_to_group: Optional[bool] = None
is_nullable: Optional[bool] = None
default_value: Optional[dict[str, Any]] = None
default_value: Optional[Any] = None
description: Optional[str] = None
type: Optional[AttributeTypeSchema] = None
@ -44,9 +44,9 @@ class DealModuleAttributeSchema(BaseSchema):
attribute_id: int
label: str
original_label: str
value: Optional[dict[str, Any]]
value: Optional[Any]
type: AttributeTypeSchema
default_value: dict[str, Any]
default_value: Any
description: str
is_applicable_to_group: bool
is_nullable: bool
@ -54,7 +54,8 @@ class DealModuleAttributeSchema(BaseSchema):
class UpdateDealModuleAttributeSchema(BaseSchema):
attribute_id: int
value: Optional[dict[str, Any]]
is_applicable_to_group: bool
value: Optional[Any] = None
# endregion
@ -79,6 +80,7 @@ class UpdateAttributeLabelRequest(BaseSchema):
class UpdateDealModuleAttributesRequest(BaseSchema):
attributes: list[UpdateDealModuleAttributeSchema]
# endregion
# region Response
@ -115,4 +117,5 @@ class GetDealModuleAttributesResponse(BaseSchema):
class UpdateDealModuleAttributesResponse(BaseResponse):
pass
# endregion