3
Ma/E                 @   sR  d dl mZ d dlmZ d dlmZ d dlT d edfdedfded	fd
edfdedfdedffZd edfdedffZ	d/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 )0    )models)User)gettext)*ZBike   ZCar   z	Small Van   z
Medium Van   z	Large Van   zNot SpecifiedzOpen to take parcelsZOccupiedPendingAcceptedRejectedc               @   s:   e Zd ZejdddZejddZejddZ	dd Z
d	S )
vehicled   T)
max_lengthnullF)default)auto_now_addc             C   s   t t | jd t | j S )Nz -- )strname)self r   4/var/www/html/Stanley/GoodsDelivery/Driver/models.py__str__!   s    zvehicle.__str__N)__name__
__module____qualname__r   	CharFieldr   BooleanField	isdeletedDateTimeField
created_atr   r   r   r   r   r      s   r   c               @   s:   e Zd ZejdddZejddZejddZ	dd Z
d	S )
trailersr   T)r   r   F)r   )r   c             C   s   t t | jd t | j S )Nz -- )r   r   )r   r   r   r   r   )   s    ztrailers.__str__N)r   r   r   r   r   r   r   r   r    r!   r   r   r   r   r   r"   $   s   r"   c               @   sZ  e Zd ZejdddddZejeej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dZejdddZejddddZej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dZejddddZejddddZejddddZejddddZejddddZejddZejddZejddZejddZ dd Z!dS )DriverModel2   T )r   r   blankr   )	on_deleter   )r   r   )r   r   r&   )r   uniquer   r&   zstatic/profile/   )	upload_tor   r&   r   )r&   r   i,  )r   r&   r   )r&   r   r   i  F)r   c             C   s   t t | jd t | j S )Nz -- )r   email)r   r   r   r   r   w   s    zDriverModel.__str__N)"r   r   r   r   r   token
ForeignKeyr   CASCADEuseruserID	companyIDZuserCodecountrycodephoneZ	firstnamelastnamer+   
ImageFieldimage	FileFieldidproofZfcmtoken	TextFieldaddressZforgotPasswordOTPemailverificationlinkZforgotpasswordlinkr   emailverifiedaccountapprovedZ
isdisabledr   r   r   r   r   r   r#   `   s,   r#   c               @   s   e Zd ZejeejdZejdddZ	ejde
ddZejdddZejde
ddZejdddZejde
ddZejdddZejde
ddZejdddZejde
ddZejddZejdd	Zd
d ZdS )driverdocuments)r'   r)   T)r   r   r$   r   )r   choicesr   )r   )auto_nowc             C   s   t t | jd t | j S )Nz  --  )r   iddriver)r   r   r   r   r      s    zdriverdocuments.__str__N)r   r   r   r   r-   r#   r.   rB   r   ZlicensefrontDRIVER_DOCUMENT_STATUSZlicensefrontstatusZlicensebackZlicensebackstatusZpersonidbackZpersonidbackstatusZpersonidfrontZpersonidfrontstatusZmedicalcardZmedicalcardstatusr    r!   
updated_atr   r   r   r   r   r>   z   s   r>   c               @   sp   e Zd ZdZejeejdZej	ddddZ
ej	ddddZej	ddddZejddZejddZdd	 Zd
S )DriverExtraMoneyz:
	This model is used to store the information of driver.
	)r'   r   T)r   r&   r   )r   )r@   c             C   s8   t t | jd t | j d t | j d t | j S )Nz  --  )r   rA   rB   descriptionamount)r   r   r   r   r      s    zDriverExtraMoney.__str__N)r   r   r   __doc__r   r-   r#   r.   rB   r   rF   rG   currencyr    r!   rD   r   r   r   r   r   rE      s   rE   c               @   s  e Zd ZejeejddZejeejddZeje	ejddZ
ejdd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dZejdddZejdddZejddZejdd	Zd
d ZdS )DriverVehicleT)r'   r   r$   r%   )r   r   r&   r   r)   )r   r   )r   )r@   c             C   s   t t | jd t | j S )Nz  --  )r   rA   rB   )r   r   r   r   r      s    zDriverVehicle.__str__N)r   r   r   r   r-   r#   r.   rB   r   r"   Ztrailerr   r1   ZvehicleNumberZvehicleLicensePlateNumberZvehicleNumberImageZvehicleLicensePlateImageZtrailerNumberZtrailerLicensePlateNumberZtrailerNumberImageZtrailerLicensePlateImageZcabCardImageZinsuranceImageZ	iftaImager    r!   rD   r   r   r   r   r   rJ      s$   rJ   c               @   sp   e Zd ZdZejeejdZeje	ejdZ
ejddddZejddddZejddZejddZdd	 Zd
S )DriverCoordinatesz:
	This model is used to store the information of driver.
	)r'   r   T)r   r&   r   )r   )r@   c             C   s8   t t | jd t | j d t | j d t | j S )Nz  --  )r   rA   rB   latitude	longitude)r   r   r   r   r      s    zDriverCoordinates.__str__N)r   r   r   rH   r   r-   r   r.   r/   r#   rB   r   rL   rM   r    r!   rD   r   r   r   r   r   rK      s   rK   c               @   sX   e Zd ZdZejeejdZej	ddddZ
ej ZejddZejddZdd	 Zd
S )DriverWorkingSlotsz:
	This model is used to store the information of driver.
	)r'   r   T)r   r&   r   )r   )r@   c             C   s8   t t | jd t | j d t | j d t | j S )Nz  --  )r   rA   rB   dateslots)r   r   r   r   r      s    zDriverWorkingSlots.__str__N)r   r   r   rH   r   r-   r#   r.   rB   r   rP   	DateFieldrO   r    r!   rD   r   r   r   r   r   rN      s   rN   c               @   s  e Zd ZdZejeejdddZeje	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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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ejddZejd	ddd
ZejddZejddZ dd Z!dS )	DriverJobz?
	This model is used to store the information of CustomerJob.
	T)r'   r   r&   r   )r   F)r   )r@   r   )r   r&   r   r   c             C   s:   t t | jd t | j d t | jj d t | j S )Nz  --  )r   rA   rB   customerjob)r   r   r   r   r   	  s    zDriverJob.__str__N)"r   r   r   rH   r   r-   CustomerJobr.   rS   r#   rB   IntegerFieldZsameIdForParcelsr   Z
jobstartedZarrived_at_pickupZparcel_picked_by_driverZstart_DropOffZarrived_atDropOffLocationZjobcompletedZdeliveryfailedZpaidtodriverZiscancelledbyadminr   Zparcel_disabledZsafeplaceDeliverdr    r!   rD   r   ZadminSumitionResaonZsubmitByAdminZpriorityBaseIDJobsr   r   r   r   r   rR      s,   rR   c               @   sZ   e Zd ZdZejeejdZeje	ejdddZ
ejdddddZejddZd	d
 ZdS )DriverDropSafePalacez:
	This model is used to store the information of driver.
	)r'   T)r'   r   r&   r)   r%   )r   r   r&   r   )r   c             C   s   t t | jd t | j S )Nz  --  )r   
driver_jobrS   )r   r   r   r   r     s    zDriverDropSafePalace.__str__N)r   r   r   rH   r   r-   rR   r.   rW   rT   rS   r7   Z	safeplacer    r!   r   r   r   r   r   rV     s   rV   c               @   s  e Zd ZdZejeej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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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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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#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(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-ejddZ.ejddZ/ejdd	Z0ejddZ1ejddZ2ejdd	Z3ejddZ4ejddZ5ejdd	Z6ejddZ7ejddZ8ejdd	Z9ejdd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?ejddZ@ejddZAejdd	ZBejddZCejddZDejdd	ZEejddZFejddZGejdd	ZHejddZIejddZJejdd	ZKejddZLejddZMejdd	ZNejddZOejddZPejdd	ZQejddZRejddZSejdd	ZTd
d ZUdS )DriverAllSlotsz:
	This model is used to store the information of driver.
	)r'   r   r%   T)r   r   r&   r   )r   F)r   c             C   s   t t | jS )N)r   rB   )r   r   r   r   r   i  s    zDriverAllSlots.__str__N)Vr   r   r   rH   r   r-   r#   r.   rB   r   ZdateOfSlots	TimeFieldZopeninghourSlot1ZclosinghourSlot1r   ZactiveSlot1ZopeninghourSlot2ZclosinghourSlot2ZactiveSlot2ZopeninghourSlot3ZclosinghourSlot3ZactiveSlot3ZopeninghourSlot4ZclosinghourSlot4ZactiveSlot4ZopeninghourSlot5ZclosinghourSlot5ZactiveSlot5ZopeninghourSlot6ZclosinghourSlot6ZactiveSlot6ZopeninghourSlot7ZclosinghourSlot7ZactiveSlot7ZopeninghourSlot8ZclosinghourSlot8ZactiveSlot8ZopeninghourSlot9ZclosinghourSlot9ZactiveSlot9ZopeninghourSlot10ZclosinghourSlot10ZactiveSlot10ZopeninghourSlot11ZclosinghourSlot11ZactiveSlot11ZopeninghourSlot12ZclosinghourSlot12ZactiveSlot12ZopeninghourSlot13ZclosinghourSlot13ZactiveSlot13ZopeninghourSlot14ZclosinghourSlot14ZactiveSlot14ZopeninghourSlot15ZclosinghourSlot15ZactiveSlot15ZopeninghourSlot16ZclosinghourSlot16ZactiveSlot16ZopeninghourSlot17ZclosinghourSlot17ZactiveSlot17ZopeninghourSlot18ZclosinghourSlot18ZactiveSlot18ZopeninghourSlot19ZclosinghourSlot19ZactiveSlot19ZopeninghourSlot20ZclosinghourSlot20ZactiveSlot120ZopeninghourSlot21ZclosinghourSlot21ZactiveSlot21ZopeninghourSlot22ZclosinghourSlot22ZactiveSlot22ZopeninghourSlot23ZclosinghourSlot23ZactiveSlot23ZopeninghourSlot24ZclosinghourSlot24ZactiveSlot24r   r   r   r   r   rX     s   rX   Nr   r   r   r   r   r   )rZ   r[   r\   )	django.dbr   django.contrib.auth.modelsr   django.utils.translationr   _Customer.modelsZVEHICLETYPE_CHOICESZDRIVERSTATUS_CHOICESrC   Modelr   r"   r#   r>   rE   rJ   rK   rN   rR   rV   rX   r   r   r   r   <module>   s2   





  <+