+
    \i7                         R t ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIH	t	  ! R R]4      t
 ! R R]
4      t ! R	 R
]4      t ! R R]
4      t ! R R]4      t ! R R]4      tR# )u3   
Schémas Pydantic pour la validation des articles
)	BaseModelFieldfield_validator)Optional)datetime)StatutArticlec                   P  a  ] tR t^
t o Rt]! R^^2RR7      t]! R^^RR7      t]! R^ RR7      t]! R^ R	R
7      t	]! RRR7      t
Rt]! ^ ^ RR7      t]! ^
^ RR7      t]! R^ R7      t]! R^ R7      t]! R^ R7      t]! R^ R7      t]! R^ R7      tRtRtRtRtRtRtRtV 3R ltRtV tR# )ArticleBaseu   Schéma de base pour un article.zCode article unique)
min_length
max_lengthdescriptionu   Désignation de l'articleu   ID de la catégorie)gtr   NzPrix d'achat HT)ger   u"   Unité (pièce, plaque, m², etc.)r   zStock initial)defaultr   r   zSeuil d'alerte stockr   g        )r   c                  < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[S[,          ;R&   S[ ;R&   S[S[ ,          ;R&   S[;R&   S[;R&   S[S[,          ;R	&   S[S[,          ;R
&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   # )   codedesignationcategorie_idprix_achat_htuniteconditionnementstock_initialseuil_alertelongueur_cm
largeur_cmepaisseur_cmlongueur_unitaire
taux_pertefournisseur_1ref_fournisseur_1delai_livraison_1fournisseur_2ref_fournisseur_2delai_livraison_2r   )strintr   float)format__classdict__s   "eC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\app\schemas\article.py__annotate__ArticleBase.__annotate__
   s?    
Z  h  K	  E?U  M  c])  L  S  %4  3   5/5! &  :' ( 2) . C='/ 0  }+1 2  }+3 6 C='7 8  }+9 :  }+; > #%?      )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r   __annotate_func____static_attributes____classdictcell__r+   s   @r,   r	   r	   
   s     )caBDYZDSQ3LghKca5JKL%*4ACT%UMs(LME%)OqQOLMbQ<RSL $)!#4K"'"3J$)$1$5L */t):"'"2J $(M'+'+#'M'+'+!%K?  r/   r	   c                       ] tR t^,tRtRtR# )ArticleCreateu   Schéma pour créer un articler0   N)r1   r2   r3   r4   r5   r7   r0   r/   r,   r;   r;   ,   s    (r/   r;   c                      a  ] tR t^1t o RtRtRtRtRtRt	Rt
RtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtV 3R ltRtV tR# )ArticleUpdateuC   Schéma pour mettre à jour un article (tous les champs optionnels)Nc                  < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R	&   S[ S[,          ;R
&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r"   r#   r$   r%   r&   r   statutr    )r   r'   r(   r)   r   )r*   r+   s   "r,   r-   ArticleUpdate.__annotate__1   sz    
3-  #%  3-&	 
 E?)  C=  c])  C='  3-&  %'  &  5/(   -  C='   }+    }+! " C='# $  }+% &  }+' ( #%) * ]#*+ ,  -- . &/ r/   r0   )r1   r2   r3   r4   r5   r   r   r   r   r   r   r   r   r   r   r   r   r!   r"   r#   r$   r%   r&   r   r?   r    r6   r7   r8   r9   s   @r,   r=   r=   1   s     MD!%K"&L%)ME%)O#'M"&L#'K"&J$(L)-#'M'+'+#'M'+'+!%K&*F)-"&J/  r/   r=   c                   P   a  ] tR t^Kt o RtRtRtRt ! R R4      tV 3R lt	Rt
V tR# )ArticleResponseu#   Schéma de réponse pour un articleNc                       ] tR t^YtRtRtR# )ArticleResponse.ConfigTr0   Nr1   r2   r3   r4   from_attributesr7   r0   r/   r,   ConfigrD   Y       r/   rG   c                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[;R	&   # )
r   idstock_actuelr?   date_creationdate_modification	volume_m3
surface_m2poids_estime_kgbadge_statut)r(   r   r   r   r)   dict)r*   r+   s   "r,   r-   ArticleResponse.__annotate__K   s     G    	 
      %  &  e_+   r/   r0   )r1   r2   r3   r4   r5   rN   rO   rP   rG   r6   r7   r8   r9   s   @r,   rB   rB   K   s*     - "&I"&J'+O   r/   rB   c                   x   a  ] tR t^]t o ]! R^ R7      t]! RRR7      t]! RRR7      tRtRt	Rt
RtV 3R ltRtV tR# )	MouvementStockCreate.r   u   Quantité (+ entrée, - sortie)r   z*Type: achat, utilisation, ajustement, etc.Nc                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   # )r   
article_idquantitetype_mouvement	referencecommentaire	projet_id	niveau_id)r(   r'   r   )r*   r+   s   "r,   r-   !MouvementStockCreate.__annotate__]   sl     & M  ^  }#	 
 #%  }#  }# r/   r0   )r1   r2   r3   r4   r   rW   rX   rY   rZ   r[   r\   r]   r6   r7   r8   r9   s   @r,   rU   rU   ]   sF     CA&J#+LMH1]^N#I!%K#I#I  r/   rU   c                   D   a  ] tR t^gt o Rt ! R R4      tV 3R ltRtV tR# )MouvementStockResponseu.   Schéma de réponse pour un mouvement de stockc                       ] tR t^qtRtRtR# )MouvementStockResponse.ConfigTr0   NrE   r0   r/   r,   rG   rb   q   rH   r/   rG   c                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[S[,          ;R&   S[S[,          ;R&   S[;R&   # )r   rJ   rW   rX   rY   rZ   r[   date_mouvement)r(   r'   r   r   )r*   r+   s   "r,   r-   #MouvementStockResponse.__annotate__g   sc     G  O  M	 
   }  #   r/   r0   N)	r1   r2   r3   r4   r5   rG   r6   r7   r8   r9   s   @r,   r`   r`   g   s     8   r/   r`   N)r5   pydanticr   r   r   typingr   r   app.models.articler   r	   r;   r=   rB   rU   r`   r0   r/   r,   <module>ri      sd    7 6   ,&) &D	K 	
'I '4k $$9 $Y r/   