feat: temp barcode templates
This commit is contained in:
64
schemas/barcode.py
Normal file
64
schemas/barcode.py
Normal file
@@ -0,0 +1,64 @@
|
||||
from schemas.base import CustomModelCamel, OkMessageSchema
|
||||
|
||||
|
||||
# region Entities
|
||||
class BarcodeTemplateAttribute(CustomModelCamel):
|
||||
id: int
|
||||
label: str
|
||||
name: str
|
||||
|
||||
|
||||
class BarcodeTemplate(CustomModelCamel):
|
||||
id: int
|
||||
name: str
|
||||
is_default: bool
|
||||
attributes: list[BarcodeTemplateAttribute]
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region Requests
|
||||
class GetBarcodeTemplateByIdRequest(CustomModelCamel):
|
||||
id: int
|
||||
|
||||
|
||||
class BarcodeTemplateCreateResponse(OkMessageSchema):
|
||||
id: int
|
||||
|
||||
|
||||
class BarcodeTemplateUpdateResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
|
||||
class GetAllBarcodeTemplateAttributesResponse(CustomModelCamel):
|
||||
attributes: list[BarcodeTemplateAttribute]
|
||||
|
||||
|
||||
class CreateBarcodeTemplateAttributeRequest(CustomModelCamel):
|
||||
name: str
|
||||
label: str
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region Responses
|
||||
class GetBarcodeTemplateByIdResponse(CustomModelCamel):
|
||||
barcode_template: BarcodeTemplate
|
||||
|
||||
|
||||
class BarcodeTemplateCreateRequest(CustomModelCamel):
|
||||
name: str
|
||||
attribute_ids: list[int]
|
||||
is_default: bool
|
||||
|
||||
|
||||
class BarcodeTemplateUpdateRequest(CustomModelCamel):
|
||||
id: int
|
||||
name: str
|
||||
is_default: bool
|
||||
attribute_ids: list[int]
|
||||
|
||||
|
||||
class CreateBarcodeTemplateAttributeResponse(OkMessageSchema):
|
||||
id: int
|
||||
# endregion
|
||||
Reference in New Issue
Block a user