16 lines
607 B
Python
16 lines
607 B
Python
from pydantic import BaseModel, Field
|
|
from typing import Optional
|
|
|
|
|
|
class FamilleCreate(BaseModel):
|
|
"""Modèle pour créer une famille d'articles"""
|
|
|
|
code: str = Field(..., description="Code famille (max 18 car)", max_length=18)
|
|
intitule: str = Field(..., description="Intitulé (max 69 car)", max_length=69)
|
|
type: int = Field(0, description="0=Détail, 1=Total")
|
|
compte_achat: Optional[str] = Field(
|
|
None, description="Compte général d'achat (ex: 607000)"
|
|
)
|
|
compte_vente: Optional[str] = Field(
|
|
None, description="Compte général de vente (ex: 707000)"
|
|
)
|