a
    d                     @   s  d dl mZ d dlT d dlT d dlmZmZmZ d dlm	Z	 d dl
mZ d dlmZ G dd dejZG d	d
 d
ejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZdS )    )models)*)CASCADESET_NULL
DO_NOTHING)
ForeignKey)now)DateTimeFieldc                   @   sp   e Zd ZejeejdZejeej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G dd dZd	S )

Favourites	on_deleteFTdefaultnullauto_now_addr   r   c                   @   s   e Zd ZdZdS )zFavourites.MetaZ
favouritesN__name__
__module____qualname__db_table r   r   ,/var/www/html/Beni/beni/panel_apis/models.pyMeta   s   r   N)r   r   r   r   r   Productsr   productUseruserBooleanFieldZis_favouriter	   Zfavourite_date
start_dateend_dater   r   r   r   r   r
   
   s   r
   c                   @   s   e Zd ZejeedZejeedZ	ej
dddZej
dddZej
dddZej
dddddZejd	d
Zejd	d
ZejddZG dd dZdS )Cartr   2    
max_lengthr   0d   Tr&   r   blankr   Fr   r   c                   @   s   e Zd ZdZdS )z	Cart.MetaZcartNr   r   r   r   r   r   !   s   r   N)r   r   r   r   r   r   r   customerr   r   	CharFieldZproductCounttotalAmountZ
totalItemsorderIdr   isPaid
isdisabledr	   
created_atr   r   r   r   r   r"      s   r"   c                   @   s   e Zd Zejeed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dZejdd	Zejd
dZG dd dZdS )CustomerCardr   r(   r$   r%   
   r#      Fr+   Tr,   c                   @   s   e Zd ZdZdS )zCustomerCard.MetaZcustomer_cardNr   r   r   r   r   r   /   s   r   N)r   r   r   r   r   Buyerr   r-   r.   Zcard_idZ	exp_monthZexp_yearZtheCustomerStripeZ
last_digitr   Z	isdefaultr	   r3   r   r   r   r   r   r4   %   s   r4   c                   @   s  e Zd Zejeed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dZejdddZejeeddZejeeddZejeejddZejdd	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
ddZejdddZejddZ G dd dZ!dS )	orderPackr   r#   r$   r%   r'   T)r   r   Fr+      r&   r   r   r   r,   c                   @   s   e Zd ZdZdS )zorderPack.MetaZ
order_packNr   r   r   r   r   r   G   s   r   N)"r   r   r   r   r   r   r   r-   r.   r0   Z	orderDateZshippingChargeZvatPercentageZsubTotalAmountr/   	AddressesZdeliveryAddressr"   ZproductDetailZStoreCouponsr   ZcouponIdr   ZisCouponSelectedZcouponDiscountr1   r2   Zis_ratedZqr_code_imageIntegerFieldZdelivery_statusr	   r3   r   r   r   r   r   r8   3   s&   r8   c                   @   s   e Zd ZejeejdZejeejdZej	dddZ
ej	dddddZej	dddddZej	dddddZejddZG d	d
 d
ZdS )CustomerTransactionr   r#   r$   r%   r9   Tr)   r,   c                   @   s   e Zd ZdZdS )zCustomerTransaction.MetaZcustomer_transcationNr   r   r   r   r   r   V   s   r   N)r   r   r   r   r   r   r   r-   r8   r.   amount	mayosarIDtxnID
recieptUrlr	   r3   r   r   r   r   r   r=   L   s   r=   c                   @   s   e Zd ZejeejdZejeejdZ	ej
dddZej
dddddZej
dddddZej
dddddZejddZG d	d
 d
ZdS )CustomerTransactionServicer   r#   r$   r%   r9   Tr)   r,   c                   @   s   e Zd ZdZdS )zCustomerTransactionService.MetaZcustomer_transcation_serviceNr   r   r   r   r   r   d   s   r   N)r   r   r   r   r   r   r   r-   ZServiceInvoiceZservicePackr.   r>   r?   r@   rA   r	   r3   r   r   r   r   r   rB   Z   s   rB   c                   @   s   e Zd Zejd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d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dZejddZG d	d
 d
ZdS )MarketingRequestr(   Tr:   r      r   r   r   c                   @   s   e Zd ZdZdS )zMarketingRequest.MetaZmarketing_requestNr   r   r   r   r   r   w   s   r   N)r   r   r   r   r.   Zproduct_name	TextFieldZprduct_descriptionZproduct_amountZproduct_priceZ
owner_nameZmobile_numberaddressemailimager<   statusr	   r    r!   r   r   r   r   r   rC   i   s   rC   c                   @   sz   e Zd ZejdddZejdddZejdddZeje	e
dZejdddZejdddZejddZG d	d
 d
ZdS )CustomerNotificationsr(   Tr:   r   Fr   r   r   c                   @   s   e Zd ZdZdS )zCustomerNotifications.MetaZcustomer_notificationsNr   r   r   r   r   r      s   r   N)r   r   r   r   r.   messageZmessage_arabicZnotification_typer   r7   r   r-   r   is_readr	   r    r!   r   r   r   r   r   rJ   {   s   rJ   c                   @   s|   e Zd ZejeeddddZejeeddddZej	ddZ
ejddgdd	Zejd
dddZejedZG dd dZdS )MessageZmessage_sender_userT)r   related_namer   r*   Zmessage_receiver_userr   )rH   rH   )textrO      )choicesr&      r$   )r&   r   r   r+   c                   @   s   e Zd ZdZdS )zMessage.MetamessagesNr   r   r   r   r   r      s   r   N)r   r   r   r   r   r   r   Zsender_userZreceiver_userrE   rK   r.   typerH   r	   r   r3   r   r   r   r   r   rM      s   rM   c                   @   s^   e Zd ZeeedddZeeedddZee	dZ
ejdddZejddZG d	d
 d
ZdS )	chat_roomZchatroom_ownerT)r   rN   r   Zchatroom_userr+      r:   r   c                   @   s   e Zd ZdZdS )zchat_room.MetarU   Nr   r   r   r   r   r      s   r   N)r   r   r   r   r   r   storer   r	   r   Zlast_message_timer   r.   Zlast_message_textr   rL   r   r   r   r   r   rU      s   
rU   c                   @   sv   e Zd ZejddZejddZeje	e
dZejee
dZejee
dZejdddZejddZG dd dZdS )RatingReviewsTr   r   r   c                   @   s   e Zd ZdZdS )zRatingReviews.MetaZrating_reviewNr   r   r   r   r   r      s   r   N)r   r   r   r   r<   ZratingrE   Zreviewr   r   r   r   r7   buyerZStoresrW   r	   r    r!   r   r   r   r   r   rX      s   rX   N)	django.dbr   Zauth_apis.modelsZstore_apis.modelsdjango.db.models.deletionr   r   r   django.db.models.fields.relatedr   django.utils.timezoner   Zdjango.db.models.fieldsr	   Modelr
   r"   r4   r8   r=   rB   rC   rJ   rM   rU   rX   r   r   r   r   <module>   s"   