
    ĉh                     Z   d dl mZ ddlmZmZmZmZmZ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 G d dej                        Z G d dej                        Z G d dej                        Zy)    )serializers   )JobPostJobApplicationAcademicQualification
DepartmentCountryStateCityc                        e Zd Z G d d      Zy)DepartmentSerializerc                       e Zd ZeZddgZy)DepartmentSerializer.MetaidnameN)__name__
__module____qualname__r   modelfields     '/var/www/apihucms/career/serializers.pyMetar      s    r   r   Nr   r   r   r   r   r   r   r   r             r   r   c                       e Zd Z ed      Z ej                  ej                  j                         dd      Z
 G d d      Zy)JobPostSerializerT	read_only
departmentquerysetsource
write_onlyc                       e Zd ZeZg dZy)JobPostSerializer.Meta)r   titler!   department_iddescriptionjob_created_atjob_last_dateN)r   r   r   r   r   r   r   r   r   r   r'      s    qr   r   N)r   r   r   r   r!   r   PrimaryKeyRelatedFieldr   objectsallr)   r   r   r   r   r   r   
   s?    %5J6K66
@R@R@V@V@Xamz~Mr rr   r   c                        e Zd Z G d d      Zy)CountrySerializerc                       e Zd ZeZddgZy)CountrySerializer.Metar   r   N)r   r   r   r	   r   r   r   r   r   r   r3      s    r   r   Nr   r   r   r   r1   r1      r   r   r1   c                       e Zd Z ed      Z ej                  ej                  j                         dd      Z
 G d d      Zy)StateSerializerTr   countryr"   c                       e Zd ZeZg dZy)StateSerializer.Meta)r   r   r6   
country_idN)r   r   r   r
   r   r   r   r   r   r   r8      s    8r   r   N)r   r   r   r1   r6   r   r-   r	   r.   r/   r9   r   r   r   r   r5   r5      s;    $/G333W__=P=P=R[dquvJ9 9r   r5   c                       e Zd Z ed      Z ej                  ej                  j                         dd      Z
 G d d      Zy)CitySerializerTr   stater"   c                       e Zd ZeZg dZy)CitySerializer.Meta)r   r   r<   state_idN)r   r   r   r   r   r   r   r   r   r   r>   "   s    4r   r   N)r   r   r   r5   r<   r   r-   r
   r.   r/   r?   r   r   r   r   r;   r;      s;    d+E1{115==;L;L;NW^kopH5 5r   r;   c                        e Zd Z G d d      Zy)AcademicQualificationSerializerc                       e Zd ZeZg dZy)$AcademicQualificationSerializer.Meta)r   degreespecialization	instituteyearmarksN)r   r   r   r   r   r   r   r   r   r   rC   '   s    %Qr   r   Nr   r   r   r   rA   rA   &   s    R Rr   rA   c                      e Zd Z ed      Z ej                  ej                  j                         dd      Z
 ed      Z ej                  ej                  j                         dd      Z ed      Z ej                  ej                  j                         dd      Z ed      Z ej                  ej                  j                         dd      Z edd	      Z G d
 d      Zd Zy)JobApplicationSerializerTr   r6   r"   r<   cityr!   F)manyrequiredc                       e Zd ZeZg dZy)JobApplicationSerializer.Meta)r   
first_name	last_namefather_namedate_of_birthgenderemailmobiler6   r9   r<   r?   rK   city_idcategorynationalitycorrespondence_addresspermanent_addressmarital_statusposition_applied_forr!   r)   job_postqualificationsN)r   r   r   r   r   r   r   r   r   r   rO   7   s    
r   r   c                     |j                  dg       }t        j                  j                  di |}|D ]#  }t	        j                  j                  dd|i| % |S )Nr_   job_applicationr   )popr   r.   creater   )selfvalidated_dataqualifications_datara   	qual_datas        r   rc   zJobApplicationSerializer.create@   sc    ,001A2F(0077I.I, 	_I!))00^^T]^	_r   N)r   r   r   r1   r6   r   r-   r	   r.   r/   r9   r5   r<   r
   r?   r;   rK   r   rW   r   r!   r   r)   rA   r_   r   rc   r   r   r   rJ   rJ   ,   s    $/G333W__=P=P=R[dquvJd+E1{115==;L;L;NW^kopHD)D0k00$,,:J:J:LU[hlmG%5J6K66
@R@R@V@V@Xamz~M4$ON
 
r   rJ   N)rest_frameworkr   modelsr   r   r   r   r	   r
   r   ModelSerializerr   r   r1   r5   r;   rA   rJ   r   r   r   <module>rk      s    & d d d ;66  
r33 r 33  
9k11 95[00 5Rk&A&A R{:: r   