31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
from typing import Optional
|
|
from pydantic import BaseModel, Field, ConfigDict
|
|
|
|
|
|
class SerieBase(BaseModel):
|
|
row: Optional[int] = Field(None, description="Serie row number (RENGLON)")
|
|
serial_numbers: Optional[str] = Field(None, max_length=50, description="Serial number (SERIEEXPO)")
|
|
model: Optional[str] = Field(None, max_length=50, description="Model (MODELOEXPO)")
|
|
sub_model: Optional[str] = Field(None, max_length=50, description="Sub model (SUBMODELOEXPO)")
|
|
brand: Optional[str] = Field(None, max_length=50, description="Brand (MARCA)")
|
|
expo_brad: Optional[str] = Field(None, max_length=50, description="Expo brand (MARCAEXPO)")
|
|
number_id: Optional[str] = Field(None, max_length=25, description="Number ID (NUMIDEXPO)")
|
|
import_invoice: Optional[str] = Field(None, max_length=15, description="Import invoice (FACTURAIMPO)")
|
|
import_line: Optional[int] = Field(None, description="Import line (LINEAIMPO)")
|
|
image_path: Optional[str] = Field(None, max_length=255, description="Image path (IMAGEPATHMEX)")
|
|
|
|
|
|
class SerieCreate(SerieBase):
|
|
pass
|
|
|
|
|
|
class SerieUpdate(SerieBase):
|
|
pass
|
|
|
|
|
|
class SerieResponse(SerieBase):
|
|
id: int
|
|
line_item_id: int
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|