
    3whV                         d dl mZ d dlmZmZ d dlmZ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y)    )serializers)datetime	timedelta)	RateListsDaytimesc                   P    e Zd Z ej                         Z ej                         Zy)UserSerializerN)__name__
__module____qualname__r   	CharFieldnamemobile     Q/mnt/ACDE16A4DE16673C/PROJECTS/DRIVERZZ/DRIVERZZ_DRIVER_APIS/trips/serializers.pyr	   r	      s"     ;  "D"[""$Fr   r	   c                   |   e Zd Z ej                         Z ej                         Z ej                         Z ej                         Z	 ej                         Z
 ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej$                         Z ej$                         Z ej                         Z ej                         Z ej                         Z ej0                         Zd Zd Zy)TripsSerializerc                 <   |j                   d k(  ri|j                  d k(  r5|j                  d k(  ry t        |j                        dz   |j                  z   S t        |j                        dz   |j
                  z   S t        |j                         dz   |j                  z   S N trip_start_dateedit_start_date
start_datestr
start_timeedit_start_timetrip_start_timeselfobjs     r   get_start_date_timez#TripsSerializer.get_start_date_time       $&""d*>>T)/4cnnDEC//0#5s7J7JJK++,c1#2E2EEFr   c                 <   |j                   d k(  ri|j                  d k(  r5|j                  d k(  ry t        |j                        dz   |j                  z   S t        |j                        dz   |j
                  z   S t        |j                         dz   |j                  z   S r   trip_end_dateedit_end_dateend_dater   end_timeedit_end_timetrip_end_timer    s     r   get_end_date_timez!TripsSerializer.get_end_date_time+       $  D(<<4'-s2CLL@AC--.3S5F5FFG))*C/0A0AABr   N)r
   r   r   r   IntegerFieldidr   vehicle_model_namevehicle_type_nametransmission_type_name	trip_typeuniform_typepickup_addresspickup_latitudepickup_longitudedestination_addressdestination_latitudedestination_longitudeSerializerMethodFieldstart_date_timeend_date_timestation_typeinstructionsstatusDateTimeField
created_atr#   r-   r   r   r   r   r   
   s5   	!	!	!	#B...0---/2[224(((*I+;++-L*[**,N+k++-O,{,,./+//10;0021K1137k779O5K557M+;++-L(;((*L%[%%'F***,J
G
Cr   r   c                   r   e Zd Z ej                         Z ej                         Z ej                         Z ej                         Z	 ej                         Z
 ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej*                         Z ej*                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej                         Z ej:                         Z ej                  d      Z ej                  d      Z d Z!d Z"y)TripSerializerz	user.name)sourcezuser.mobilec                 <   |j                   d k(  ri|j                  d k(  r5|j                  d k(  ry t        |j                        dz   |j                  z   S t        |j                        dz   |j
                  z   S t        |j                         dz   |j                  z   S r   r   r    s     r   r#   z"TripSerializer.get_start_date_timeU   r$   r   c                 <   |j                   d k(  ri|j                  d k(  r5|j                  d k(  ry t        |j                        dz   |j                  z   S t        |j                        dz   |j
                  z   S t        |j                         dz   |j                  z   S r   r&   r    s     r   r-   z TripSerializer.get_end_date_timeb   r.   r   N)#r
   r   r   r   r/   r0   r   r1   r2   r3   vehicle_model_idvehicle_type_idtransmission_type_idr4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   amount
net_amountrA   rB   rC   r   r   r#   r-   r   r   r   rE   rE   :   s   	!	!	!	#B...0---/2[224/{//1.k..0O3;335(((*I+;++-L*[**,N+k++-O,{,,./+//10;0021K1137k779O5K557M+;++-L(;((*L&k&&(F*+**,J%[%%'F***,J ;  4D"[""-8F
G
Cr   rE   c                   r    e Zd Z ej                         Z ej                         Z ej                         Zy)TaxSerializerN)	r
   r   r   r   r/   r0   r   titletax_percentager   r   r   rO   rO   p   s2    	!	!	!	#B!K!!#E*[**,Nr   rO   N)rest_frameworkr   r   r   rates.modelsr   r   
Serializerr	   r   rE   rO   r   r   r   <module>rU      s\    & ( ,%[++ %
+Ck,, +C`2C[++ 2Cl-K** -r   