Files
The_Great_Excel_Project/src/models/pydantic_models/goods.py
2026-07-22 16:12:10 +03:00

35 lines
1.8 KiB
Python

from decimal import Decimal
from src.models.pydantic_models.model import Base
from pydantic import Field
from typing import Annotated
class NomenclatureCreate(Base):
article:Annotated[str, Field(...,min_length=5,max_length=16, description="name of the article")]
price:Annotated[Decimal, Field(..., max_digits=12, description="price of the article")]
tnvd:Annotated[int, Field(..., max_digits=10, description="tnvd from the Markirovka.crpt")]
status:Annotated[bool, Field(..., description="status of the article")]
doc_type:Annotated[str, Field(..., description="document type (declaration or certificate)")]
fabric:Annotated[str, Field(..., description="fabric of the product")]
class NomenclatureOut(Base):
article:Annotated[str, Field(..., min_length=5,max_length=16, description="name of the article")]
price:Annotated[Decimal, Field(..., max_digits=12,description="price of the article")]
tnvd:Annotated[int, Field(..., max_digits=10,description="tnvd from the Markirovka.crpt")]
status:Annotated[bool, Field(..., description="status of the article")]
doc_type:Annotated[str, Field(...,max_length=64, description="document type (declaration or certificate)")]
fabric:Annotated[str, Field(...,max_length=64, description="fabric of the product")]
class DocumentTypeCreate(Base):
name:Annotated[str, Field(...,max_length=64, description="certificate or declaration")]
class DocumentTypeOut(Base):
name:Annotated[str, Field(..., max_length=64,description="certificate or declaration")]
class FabricCreate(Base):
name:Annotated[str, Field(..., max_length=64,description="certificate or declaration")]
class FabricOut(Base):
name:Annotated[str, Field(..., max_length=64,description="certificate or declaration")]