3
`>2                 @   s  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	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)User)gettext)*ZBike   ZCar   z	Small Van   z
Medium Van   z	Large Van   zNot SpecifiedzOpen to take parcelsZOccupiedc               @   s:  e Zd ZdZejeejdZej	e
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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e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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dddZ"ejdddddZ#ej	ddZ$ejdddddZ%ej	ddZ&ejdddddZ'ej	ddZ(ejdddddZ)ej	ddZ*ejdddddZ+ej	ddZ,ejddddZ-ejddddZ.ej/ddZ0ej/ddZ1ej/ddZ2ej/ddZ3dd Z4dS )DriverModelz:
	This model is used to store the information of driver.
	)	on_deleter   )choicesdefaultd   T)
max_lengthnull)r   r   blank)r   uniquer   r   zstatic/profile/   )	upload_tor   r   r   )r   r   i,  )r   r   r   N)r   r   r   r    )r   r   r   )r   r   r   r   )r   i  Fc             C   s   t t | jd t | j S )Nz -- )stremail)self r   7/var/www/html/Stanley/GoodsDeliveryOLD/Driver/models.py__str__J   s    zDriverModel.__str__)5__name__
__module____qualname____doc__r   
ForeignKeyr   CASCADEuserIntegerFieldDRIVERSTATUS_CHOICESstatus	CharFieldcountrycodephonenamer   
ImageFieldimage	FileFieldidproofZfcmtokenVehicleTypeSET_NULLvehicletypevehicleimagevehiclenumberZpreferredarea	TextFieldaddressZcityZ
postalcodecountryZnational_insurance_numberZdriving_license_numberZlicense_frontZlicense_front_documentStatusZlicense_backZlicense_back_documentStatusZid_frontZid_front_documentStatusZid_backZid_back_documentStatusZcrb_dbsZcrb_dbs_documentStatusemailverificationlinkZforgot_password_linkBooleanFieldemailverifiedaccountapprovedZ
isdisabled	isdeletedr   r   r   r   r   r      sJ   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   )auto_now_add)auto_nowc             C   s8   t t | jd t | j d t | j d t | j S )Nz  --  )r   iddriverdescriptionamount)r   r   r   r   r   Y   s    zDriverExtraMoney.__str__N)r   r   r   r    r   r!   r   r"   r@   r'   rA   rB   currencyDateTimeField
created_at
updated_atr   r   r   r   r   r<   M   s   r<   c               @   s   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dZejd	d
ZejdddddZejd	d
ZejdddddZej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ejddZejddZejd	d
Zdd ZdS )DriverVehiclez:
	This model is used to store the information of driver.
	)r   r   T)r   r   r   r   r   )r   r   r   r   r   )r   F)r=   )r>   c             C   s*   t t | jd t | j d t | j S )Nz  --  )r   r?   r@   r1   )r   r   r   r   r   t   s    zDriverVehicle.__str__N)r   r   r   r    r   r!   r   r"   r@   r'   r3   r1   r-   r2   r$   Zvehicleimage_statusZmotor_insuranceZmotor_insurance_statusZgoods_in_transit_coverZgoods_in_transit_cover_statusZpublic_liability_insuranceZ!public_liability_insurance_statusr8   activeZ
is_deletedrD   rE   rF   Zvehicle_approve_statusr   r   r   r   r   rG   ]   s$   rG   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   r?   r@   latitude	longitude)r   r   r   r   r      s    zDriverCoordinates.__str__N)r   r   r   r    r   r!   r   r"   r#   r   r@   r'   rJ   rK   rD   rE   rF   r   r   r   r   r   rI   x   s   rI   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   r?   r@   dateslots)r   r   r   r   r      s    zDriverWorkingSlots.__str__N)r   r   r   r    r   r!   r   r"   r@   r'   rN   	DateFieldrM   rD   rE   rF   r   r   r   r   r   rL      s   rL   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   r?   r@   customerjob)r   r   r   r   r      s    zDriverJob.__str__N)"r   r   r   r    r   r!   CustomerJobr"   rQ   r   r@   r$   ZsameIdForParcelsr8   Z
jobstartedZarrived_at_pickupZparcel_picked_by_driverZstart_DropOffZarrived_atDropOffLocationZjobcompletedZdeliveryfailedZpaidtodriverZiscancelledbyadminr;   Zparcel_disabledZsafeplaceDeliverdrD   rE   rF   r'   ZadminSumitionResaonZsubmitByAdminZpriorityBaseIDJobsr   r   r   r   r   rP      s,   rP   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_jobrQ   )r   r   r   r   r      s    zDriverDropSafePalace.__str__N)r   r   r   r    r   r!   rP   r"   rT   rR   rQ   r-   Z	safeplacerD   rE   r   r   r   r   r   rS      s   rS   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   r@   )r   r   r   r   r     s    zDriverAllSlots.__str__N)Vr   r   r   r    r   r!   r   r"   r@   r'   ZdateOfSlots	TimeFieldZopeninghourSlot1ZclosinghourSlot1r8   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   rU      s   rU   N)	django.dbr   django.contrib.auth.modelsr   django.utils.translationr   _Customer.modelsZVEHICLETYPE_CHOICESr%   Modelr   r<   rG   rI   rL   rP   rS   rU   r   r   r   r   <module>   s&   





2