feat: temp barcode templates
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import validator, field_validator
|
||||
|
||||
from models import ProductBarcode
|
||||
from schemas.barcode import BarcodeTemplateSchema
|
||||
from schemas.base import CustomModelCamel, PaginationInfoSchema, OkMessageSchema
|
||||
from pydantic import field_validator
|
||||
from models import ProductBarcode
|
||||
|
||||
|
||||
# region Entities
|
||||
@@ -14,6 +13,7 @@ class ProductSchema(CustomModelCamel):
|
||||
article: str
|
||||
client_id: int
|
||||
barcodes: list[str]
|
||||
barcode_template: BarcodeTemplateSchema | None = None
|
||||
|
||||
@field_validator('barcodes', mode="before")
|
||||
def barcodes_to_list(cls, v):
|
||||
@@ -30,7 +30,7 @@ class ProductCreateRequest(CustomModelCamel):
|
||||
article: str
|
||||
client_id: int
|
||||
barcodes: List[str]
|
||||
|
||||
barcode_template: BarcodeTemplateSchema | None = None
|
||||
|
||||
class ProductDeleteRequest(CustomModelCamel):
|
||||
product_id: int
|
||||
|
||||
Reference in New Issue
Block a user