Sage100-ws/schemas/articles/famille_d_articles.py
2025-12-29 15:07:04 +01:00

19 lines
725 B
Python

from pydantic import BaseModel, Field, validator, EmailStr, field_validator
from typing import Optional, List, Dict
from enum import Enum, IntEnum
from datetime import datetime, date
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)"
)