
    nj3)                        d dl mZ d dlZd dlmZ d dlmZ  G d dej                        Z G d dej                        Z	 G d	 d
ej                        Z
 G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d d ej                        Z G d! d"ej                        Z G d# d$ej                        Z G d% d&ej                        Zy)'    )modelsN)Shop)Usersc                      e Zd Z ej                  dej                  dd      Z ej                  d      Z ej                  dd      Z	 ej                  dd      Z ej                  dd	      Z ej                  d
dd      Z ej                  ddd      Z ej                  ddd      Z ej"                  dd      Z ej&                  d      Zd Zy)ProductCategoryTFprimary_keydefaultuniqueeditabled   
max_length   r   r   auto_now_addnullauto_nowr   icons/	upload_tor   blankstandard_images/banners/
shops.Shopr   r
   c                     | j                   S N)category_nameselfs    MC:\Users\Saasvaap\Desktop\Akash\Saasvaap\DEMO\Navya-Bakers\products\models.py__str__zProductCategory.__str__   s    !!!    N)__name__
__module____qualname__r   	UUIDFielduuiduuid4	CharFieldr"   category_codeDateTimeField
created_atupdated_date
ImageFieldiconstandard_imagebanner_imageManyToManyField
sales_unitBooleanFieldlong_distance_availabilityr&    r'   r%   r   r   
   s    6djjX]^D$F$$4M$F$$DAM%%%4dCJ'6''TBL6xd$GD&V&&1C$VZ[N$6$$zDQL'''TBJ!4!4!4U!C"r'   r   c                      e Zd Z ej                  dej                  dd      Z ej                  d      Z ej                  dd      Z	 ej                  eej                        Z ej                  d	dd
      Z ej                   dd      Z ej                   dd      Z ej&                  dd      Z ej*                  d      Zd Zy)ProductSubCategoryTFr   r   r   r   r   	on_deleter   r   r   r   r   r   r   c                     | j                   S r!   )sub_category_namer#   s    r%   r&   zProductSubCategory.__str__&   s    %%%r'   N)r(   r)   r*   r   r+   r,   r-   r.   rA   sub_category_code
ForeignKeyr   CASCADEcategoryr3   r5   r0   r1   r2   r7   r8   r9   r:   r&   r;   r'   r%   r=   r=      s    6djjX]^D(((C8(((CE v  FNNKH&V&&1C$VZ[N%%%4dCJ'6''TBL'''TBJ!4!4!4U!C&r'   r=   c                      e Zd Z ej                  dddg      Z ej                  d      Z ej                  d      Z ej                  e	ej                        Z ej                  eej                        Z ej                  d      Z ej                  dd	d
g      Z ej"                  ddd      Z ej"                  ddd      Z ej"                  ddd      Z ej"                  ddd      Z ej,                  dd      Z ej,                  dd      Z ej2                  dd      Z ej6                  d      Zd Zy)Productsr   )Master ProductrH   )Custom ProductrI   r   choicesx   r   r>     VegrO   Non VegrQ      Tr   r   r   r   r   r   r   Fr   c                 R    | j                    d| j                   d| j                   S Nz - )item_categoryitem_sub_category	item_namer#   s    r%   r&   zProducts.__str__;   s,    $$%S)?)?(@DNNCSTTr'   N)r(   r)   r*   r   r.   product_typerX   	item_coderC   r   rD   rV   r=   rW   	TextFielditem_descriptionveg_or_non_veg_status
FloatFieldi_gsts_gstc_gstcessr0   created_dater2   r7   r8   r9   r:   r&   r;   r'   r%   rG   rG   *   sX   #6##s=a  dH  =I  JL   C0I   C0I%F%%oPM)))*<W'v''48,F,,nVlEmnF4tDEF$dCEF$dCE6$dCD'6''TEL'6''DAL'''DAJ!4!4!4U!CUr'   rG   c                   >   e Zd Z ej                  edej                        Z ej                  d      Z	 ej                  d      Z
 ej                         Z ej                  d      Z ej                  ddd      Z ej                         Z ej                         Z ej                  dg d	
      Z ej&                  d      Z ej*                  dd      Z ej.                  d      Z ej.                  d      Z ej.                  d      Zd Zy)SKUskusrelated_namer?   rL   r   rR   TrS   r   )Visiblerj   Disabledrl   Out of Stockrn   rJ   r   r   r   Fr   c                 N    d| j                   j                   d| j                   S )NzSKU for : )productrX   sku_namer#   s    r%   r&   zSKU.__str__N   s$    $,,001DMM?CCr'   N)r(   r)   r*   r   rC   rG   rD   rr   r.   rs   sku_codePositiveIntegerFieldsku_quantitysku_unitr^   sku_mrpsku_expiry_durationsku_bulk_qty_limit
sku_statusr0   r1   r7   r8   r9   r:   same_day_deliverycustomization_availabler&   r;   r'   r%   re   re   >   s   fvXGv3/Hv3/H.6..0Lv2.Hf2DEG5&5574446!!!S  ;O  PJ%%%48J'''dCJ!4!4!4U!C+++E:1f11%@Dr'   re   c                       e Zd Z ej                  edej                        Z ej                  d      Z	 ej                  d      Zd Zy)	ProductImageimagesrg   zproduct_images/r   Tro   c                 4    d| j                   j                   S Nz
Image for rr   rX   r#   s    r%   r&   zProductImage.__str__W       DLL22344r'   N)r(   r)   r*   r   rC   rG   rD   rr   r3   imager0   rc   r&   r;   r'   r%   r   r   R   sF    fx6>>ZGF(9:E'6''T:L5r'   r   c                       e Zd Z ej                  edej                        Z ej                  d      Z	 ej                  d      Zd Zy)	ProductVideovideosrg   zproduct_videos/r   Tro   c                 4    d| j                   j                   S Nz
Video for r   r#   s    r%   r&   zProductVideo.__str__`   r   r'   N)r(   r)   r*   r   rC   rG   rD   rr   	FileFieldvideor0   rc   r&   r;   r'   r%   r   r   [   sF    fx6>>ZGF'89E'6''T:L5r'   r   c                   ^   e Zd Z ej                  eej                        Z ej                  edej                        Z	 ej                  g d      Z ej                  d      Z ej                         Z ej                   d	      Z ej$                  d
      Zd Z G d d      Zy)ProductReviewr>   reviewsrg   ))   z1 Star)   z2 Stars)   z3 Stars)   z4 Stars)   z5 Stars)rK      r   Fr   Tro   c                     | j                   j                   d| j                   j                   d| j                  j                   S )N z's review on user
first_name	last_namerr   rX   r#   s    r%   r&   zProductReview.__str__l   s:    ))&&'q)<)<(=]4<<KaKaJbccr'   c                       e Zd ZdgZy)ProductReview.Metaz-created_atN)r(   r)   r*   orderingr;   r'   r%   Metar   o   s	    !?r'   r   N)r(   r)   r*   r   rC   r   rD   r   rG   rr   ru   ratingr.   review_headingr[   review_textr9   is_approvedr0   r1   r&   r   r;   r'   r%   r   r   c   s    6Ufnn=DfyFNN[G(V((  2A  BF%V%%5N"&""$K%&%%e4K%%%48Jd# #r'   r   c                       e Zd Z ej                  eej                        Z ej                  eej                  dd      Z	 ej                  dg dd      Z ej                  dg d      Zy	)
SalesUnitProductSelectionr>   T)r?   r   r   r   ri   rl   r   rK   r
   rJ   N)r(   r)   r*   r   rC   r   rD   r8   re   skur.   shop_admin_statusstatusr;   r'   r%   r   r   r   sv    """46>>BJ
&

C6>>4PT
UC(((C  DW  ak  lV  9L  MFr'   r   c                       e Zd Z ej                  d      Z ej                  ddd      Z ej                  e	      Z
 ej                  d      Zd Zy)	Tags#   r   r   Tr   ro   c                     | j                   S r!   )tag_namer#   s    r%   r&   zTags.__str__   s    }}r'   N)r(   r)   r*   r   r.   r   r3   r4   r7   rG   productsr0   r1   r&   r;   r'   r%   r   r   z   sS    v2.H6xd$GD%v%%h/H%%%48Jr'   r   c                       e Zd Z ej                  d      Z ej                  e      Z ej                  d      Z
d Zy)DynamicFilteringr   r   Tro   c                     | j                   S r!   )filter_namer#   s    r%   r&   zDynamicFiltering.__str__   s    r'   N)r(   r)   r*   r   r.   r   r7   rG   r   r0   r1   r&   r;   r'   r%   r   r      s=    "&""b1K%v%%h/H%%%48J r'   r   c                       e Zd Z ej                  d      Z ej                  ddd      Z ej                  ddd      Z ej                  ddd      Z	 ej                  e      Z ej                  d      Zd	 Zy
)SpecialListr   r   r   Tr   r   r   ro   c                     | j                   S r!   )special_namer#   s    r%   r&   zSpecialList.__str__   s       r'   N)r(   r)   r*   r   r.   r   r3   r4   r5   r6   r7   rG   r   r0   r1   r&   r;   r'   r%   r   r      s    #6##r2L6xd$GD&V&&1C$VZ[N$6$$zDQL%v%%h/H%%%48J!r'   r   c                      e Zd Z ej                  d      Z ej                  d      Z ej                  d      Z ej                  dddg      Z	 ej                  d	      Z ej                  d
	      Z ej                  dg ddd      Zg dZ ej                  ded      Z ej                   dd      Z ej                   dd      Zd Zy)CustomProductrL   r   rM   r   rN   rP   rJ   zMinimum size of the product)	help_textzMaximum size of the productrR   ))gr   )kgr   )mlr   )lr   r   z2Unit of size (grams, kilograms, milliliters, etc.))r   rK   r
   r   ))	Availabler   rk   rm   r   r   Tr   r   c                 8    | j                    d| j                   S rU   )rX   r]   r#   s    r%   r&   zCustomProduct.__str__   s    ..!T%?%?$@AAr'   N)r(   r)   r*   r   r.   rX   rZ   r[   r\   r]   ru   min_sizemax_size	size_unitAVAILABILITY_CHOICESavailabilityr0   rc   r2   r&   r;   r'   r%   r   r      s       C0I   C0I'v''48,F,,nVlEmn +v**5RSH*v**5RSH   B8lvy  Fz  {I
 $6##r;OYdeL'6''TEL'6''DALBr'   r   c                       e Zd Z ej                  edej                        Z ej                  d      Z	 ej                  d      Zd Zy)	CustomProductImager   rg   zcustom_product_images/r   Tro   c                 4    d| j                   j                   S r   custom_productrX   r#   s    r%   r&   zCustomProductImage.__str__       D//99:;;r'   N)r(   r)   r*   r   rC   r   rD   r   r3   r   r0   rc   r&   r;   r'   r%   r   r      sI    &V&&}8W]WeWefNF(@AE'6''T:L<r'   r   c                       e Zd Z ej                  edej                        Z ej                  d      Z	 ej                  d      Zd Zy)	CustomProductVideor   rg   zcustom_product_videos/r   Tro   c                 4    d| j                   j                   S r   r   r#   s    r%   r&   zCustomProductVideo.__str__   r   r'   N)r(   r)   r*   r   rC   r   rD   r   r   r   r0   rc   r&   r;   r'   r%   r   r      sI    &V&&}8W]WeWefNF'?@E'6''T:L<r'   r   c                       e Zd Z ej                  eej                        Z ej                  eej                        Z	 ej                  d      Z ej                  dd      Z G d d      Zd Zy)	Wishlistr>   Tro   r   c                       e Zd ZdZy)Wishlist.Meta)r   rr   N)r(   r)   r*   unique_togetherr;   r'   r%   r   r      s    -r'   r   c                     d| j                   j                   d| j                   j                   d| j                  j                   S )NzWishlist item for r   rq   r   r#   s    r%   r&   zWishlist.__str__   s?    #DII$8$8#9499;N;N:OrRVR^R^RhRhQijjr'   N)r(   r)   r*   r   rC   r   rD   r   rG   rr   r0   r1   
updated_atr   r&   r;   r'   r%   r   r      sh    6Ufnn=DfFNNCG%%%48J%%%t$?J. .kr'   r   c                       e Zd Z ej                  eej                  d      Z ej                  e      Z	 ej                  d      Z ej                  dd      Zd Zy)YouMayAlsoLiker   )r?   rh   Tro   r   c                 4    d| j                   j                   S )NzAlso Liked Items for r   r#   s    r%   r&   zYouMayAlsoLike.__str__   s    &t||'='=&>??r'   N)r(   r)   r*   r   OneToOneFieldrG   rD   rr   r7   liked_productsr0   r1   r   r&   r;   r'   r%   r   r      s[    "f""8v~~V`bG+V++H5N%%%48J%%%t$?J@r'   r   c                      e Zd Z ej                  edej                        Z ej                  dd      Z	 ej                  dd      Z
 ej                  dd      Z ej                  dd      Z ej                  dd      Zy)ProductDescriptiondescriptionsrg   T)r   r   N)r(   r)   r*   r   rC   rG   rD   rr   r[   ingredient_infonutritional_infoallergen_descriptionallergen_infoadditional_infor;   r'   r%   r   r      s    f~QWQ_Q_`G&f&&T=O'v''d>+6++$TB$F$$4d;M&f&&T=Or'   r   )	django.dbr   r,   shops.modelsr   accounts.modelsr   Modelr   r=   rG   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r;   r'   r%   <module>r      s-      !"fll ""& &Uv|| U(D&,, D(56<< 556<< 5#FLL #M M6<<  v||  	!&,, 	!BFLL B,< << <
kv|| 
k@V\\ @> >r'   