
    u(i                        d dl mZmZ d dlmZmZ d dlmZ  G d de      Z G d de      Z G d d	e      Z	 G d
 de      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de	      Z G d de
      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#e      Z G d$ d%e	      Z G d& d'e
      Z G d( d)e      Z G d* d+e      Z G d, d-e      Z G d. d/e      Z G d0 d1e      Z G d2 d3e      Z G d4 d5e      Z G d6 d7e      Z  G d8 d9e      Z! G d: d;e      Z" G d< d=e      Z# G d> d?e      Z$ G d@ dAe      Z%yB)C    )	BaseModelField)OptionalList)datetimec                       e Zd ZU eed<   eed<   dZee   ed<   dZee   ed<   dZ	ee   ed<   dZ
ee   ed<   dZee   ed<   d	Zee   ed
<   d	Zee   ed<   d	Zee   ed<   y)ProductBase
product_idproduct_nameN
short_namedescription
brand_namefk_product_category_id
image_pathFeligible_for_returndisplay_on_posdisplay_on_online_store)__name__
__module____qualname__int__annotations__strr   r   r   r   r   r   r   boolr   r        H/var/www/html/hubwallet-dev/src/smart_inventory/apps/products/schemas.pyr	   r	      s    O $J$!%K#% $J$,0HSM0 $J$*/$/%*NHTN*.3Xd^3r   r	   c                   "    e Zd ZU eed<   eed<   y)LocationBaselocation_idlocation_nameNr   r   r   r   r   r   r   r   r   r   r          r   r   c                   6    e Zd ZU eed<   eed<   dZee   ed<   y)
VendorBase	vendor_idvendor_nameNvendor_code)r   r   r   r   r   r   r(   r   r   r   r   r%   r%      s    N!%K#%r   r%   c                   "    e Zd ZU eed<   eed<   y)CategoryBasecategory_idcategory_nameNr"   r   r   r   r*   r*      r#   r   r*   c                       e Zd ZU eed<   eed<   eed<   dZee   ed<   dZee   ed<   dZ	ee   ed<   dZ
ee   ed<   d	Zee   ed
<   dZee   ed<   dZee   ed<   y)ProductPriceBaseproduct_price_idr
   r    Ncost_price_per_unitmarkup_valuemargin_valueretail_price_excl_taxr   compare_at_pricemarkup_type_namemargin_type_name)r   r   r   r   r   r0   r   floatr1   r2   r3   r4   r5   r   r6   r   r   r   r.   r.   $   sz    O+/%/$(L(5/($(L(5/(-18E?1()huo)&*hsm*&*hsm*r   r.   c                   "    e Zd ZU eed<   eed<   y)ProductVendorBaser
   r&   Nr   r   r   r   r   r   r   r   r9   r9   1   s    ONr   r9   c                   "    e Zd ZU eed<   eed<   y)ProductLocationBaser
   r    Nr:   r   r   r   r<   r<   6   s    Or   r<   c                       e Zd Zy)ProductCreateNr   r   r   r   r   r   r>   r>   <       r   r>   c                       e Zd Zy)LocationCreateNr?   r   r   r   rB   rB   @   r@   r   rB   c                       e Zd Zy)VendorCreateNr?   r   r   r   rD   rD   D   r@   r   rD   c                       e Zd Zy)CategoryCreateNr?   r   r   r   rF   rF   H   r@   r   rF   c                       e Zd Zy)ProductPriceCreateNr?   r   r   r   rH   rH   L   r@   r   rH   c                       e Zd Zy)ProductVendorCreateNr?   r   r   r   rJ   rJ   P   r@   r   rJ   c                       e Zd Zy)ProductLocationCreateNr?   r   r   r   rL   rL   T   r@   r   rL   c                   @    e Zd ZU eed<   eed<   eed<    G d d      Zy)
ProductOutid
created_at
updated_atc                       e Zd ZdZy)ProductOut.ConfigTNr   r   r   from_attributesr   r   r   ConfigrS   ^       r   rV   Nr   r   r   r   r   r   rV   r   r   r   rN   rN   Y       G r   rN   c                   @    e Zd ZU eed<   eed<   eed<    G d d      Zy)LocationOutrO   rP   rQ   c                       e Zd ZdZy)LocationOut.ConfigTNrT   r   r   r   rV   r]   g   rW   r   rV   NrX   r   r   r   r[   r[   b   rY   r   r[   c                   @    e Zd ZU eed<   eed<   eed<    G d d      Zy)	VendorOutrO   rP   rQ   c                       e Zd ZdZy)VendorOut.ConfigTNrT   r   r   r   rV   ra   p   rW   r   rV   NrX   r   r   r   r_   r_   k   rY   r   r_   c                   @    e Zd ZU eed<   eed<   eed<    G d d      Zy)CategoryOutrO   rP   rQ   c                       e Zd ZdZy)CategoryOut.ConfigTNrT   r   r   r   rV   re   y   rW   r   rV   NrX   r   r   r   rc   rc   t   rY   r   rc   c                   @    e Zd ZU eed<   eed<   eed<    G d d      Zy)ProductPriceOutrO   rP   rQ   c                       e Zd ZdZy)ProductPriceOut.ConfigTNrT   r   r   r   rV   ri      rW   r   rV   NrX   r   r   r   rg   rg   }   rY   r   rg   c                   6    e Zd ZU eed<   eed<    G d d      Zy)ProductVendorOutrO   rP   c                       e Zd ZdZy)ProductVendorOut.ConfigTNrT   r   r   r   rV   rm      rW   r   rV   NrX   r   r   r   rk   rk          G r   rk   c                   6    e Zd ZU eed<   eed<    G d d      Zy)ProductLocationOutrO   rP   c                       e Zd ZdZy)ProductLocationOut.ConfigTNrT   r   r   r   rV   rr      rW   r   rV   NrX   r   r   r   rp   rp      rn   r   rp   c                   J    e Zd ZU g Zee   ed<   g Zee   ed<    G d d      Z	y)ProductDetailOutproduct_vendorsproduct_locationsc                       e Zd ZdZy)ProductDetailOut.ConfigTNrT   r   r   r   rV   rx      rW   r   rV   N)
r   r   r   ru   r   rk   r   rv   rp   rV   r   r   r   rt   rt      s-    .0OT*+024t./4 r   rt   c                   n    e Zd ZU  edd      Zeed<    eddd      Zeed<    ed	dd
d      Zeed<   y)ProductFetchRequest   zCompany ID for API request)defaultr   
company_id   zPage number to fetch)r|   ger   page_number
   d   zNumber of items per page)r|   r   ler   	page_sizeN)	r   r   r   r   r}   r   r   r   r   r   r   r   rz   rz      s>    A3OPJPQ1:PQKQ2!A[\Is\r   rz   c                   @    e Zd ZU eed<   eed<   eed<   dZee   ed<   y)
TaskResulttask_idstatusmessageNdata)r   r   r   r   r   r   r   dictr   r   r   r   r      s    LKLD(4.r   r   c                       e Zd ZU eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   d	Zee   ed
<   d	Z	ee   ed<   y	)APIPriceproductPriceIdfkProductIdfkLocationIdcostPricePerUnitmarkupValuemarginValueretailPriceExclTaxcompareAtPriceNmarkupTypeNamemarginTypeName)
r   r   r   r   r   r7   r   r   r   r   r   r   r   r   r      sN    $(NHSM($(NHSM(r   r   c                       e Zd ZU eed<   y)APIImage	imagePathN)r   r   r   r   r   r   r   r   r   r      s    Nr   r   c                   "    e Zd ZU eed<   eed<   y)APILocation
locationIdlocationNameNr"   r   r   r   r   r      s    Or   r   c                   6    e Zd ZU eed<   eed<   dZee   ed<   y)	APIVendorvendorId
vendorNameN
vendorCode)r   r   r   r   r   r   r   r   r   r   r   r   r      s    MO $J$r   r   c                   *   e Zd ZU eed<   eed<   dZee   ed<   dZee   ed<   dZ	ee   ed<   dZ
ee   ed<   dZee   ed<   d	Zee   ed
<   d	Zee   ed<   d	Zee   ed<   dZeee      ed<   dZeee      ed<   dZeee      ed<   dZeee      ed<   y)
APIProduct	productIdproductNameN	shortNamer   	brandNamecategoryNamefkProductCategoryIdFeligibleForReturndisplayOnPOSdisplayOnOnlineStorepricesproductImages	locationsvendors)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s    N#Ix}#!%K#%#Ix}#"&L(3-&)-#-(-x~-#(L(4.(+0(4.0'+FHT(^$+.2M8DN+2-1Ix[)*1)-GXd9o&-r   r   c                   @    e Zd ZU eed<   dZee   ed<   dZee	   ed<   y)APIResponsesuccessNerrorMessager   )
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s#    M"&L(3-&D(4.r   r   c                   (    e Zd ZU ee   ed<   eed<   y)APIDataitems	totalRowsN)r   r   r   r   r   r   r   r   r   r   r   r      s    
Nr   r   N)&pydanticr   r   typingr   r   r   r	   r   r%   r*   r.   r9   r<   r>   rB   rD   rF   rH   rJ   rL   rN   r[   r_   rc   rg   rk   rp   rt   rz   r   r   r   r   r   r   r   r   r   r   r   <module>r      s   % ! 
4) 
49 
& &9 

+y 
+	 
) 	K 		\ 		: 		\ 		) 		+ 		/ 	
 , 
 , & ( , z ]) ]   
)y 
)y ) 
%	 %. ." )  i r   