o
    i                     @   s  d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZ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 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 )(    )serializers)CollegeHeroSectionBadgeAboutSectionAboutContentDirectorSectionProgramsSectionProgramWhyChooseSectionFeatureFacultySectionFacultyTestimonialSectionTestimonialRecruitersSection	RecruiterInfrastructureSectionFacilityc                   @      e Zd ZG dd dZdS )BadgeSerializerc                   @      e Zd ZeZdgZdS )zBadgeSerializer.MetatextN)__name__
__module____qualname__r   modelfields r   r   )/var/www/apihucms/colleges/serializers.pyMeta
       
r    Nr   r   r   r    r   r   r   r   r   	       r   c                   @   &   e Zd ZedddZG dd dZdS )HeroSectionSerializerTmany	read_onlyc                   @      e Zd ZeZg dZdS )zHeroSectionSerializer.Meta)titlesubtitlebackground_imageadmission_infobadgesN)r   r   r   r   r   r   r   r   r   r   r           r    N)r   r   r   r   r.   r    r   r   r   r   r%          r%   c                   @   r   )AboutContentSerializerc                   @   r   )zAboutContentSerializer.MetacontentN)r   r   r   r   r   r   r   r   r   r   r       r!   r    Nr"   r   r   r   r   r1      r#   r1   c                   @   r$   )AboutSectionSerializerTr&   c                   @   r)   )zAboutSectionSerializer.Meta)r*   imagecontent_paragraphsN)r   r   r   r   r   r   r   r   r   r   r       r/   r    N)r   r   r   r1   r5   r    r   r   r   r   r3      r0   r3   c                   @   r   )DirectorSectionSerializerc                   @   r)   )zDirectorSectionSerializer.Meta)namer*   messager4   N)r   r   r   r   r   r   r   r   r   r   r    "   r/   r    Nr"   r   r   r   r   r6   !   r#   r6   c                   @   sT   e Zd ZejdddZejdddZe Z	ejdddZ
dd ZG dd	 d	Zd
S )ProgramSerializerz	course.idT)sourcer(   zcourse.titlezcourse.durationc                 C   s"   |j r|j jrd|j j dS d S )Nz/academics/programs/courses//)courseslug)selfobjr   r   r   get_course_link,   s   z!ProgramSerializer.get_course_linkc                   @   r)   )zProgramSerializer.Meta)r7   program_type	course_idcourse_titlecourse_linkdurationN)r   r   r   r
   r   r   r   r   r   r   r    1   r/   r    N)r   r   r   r   IntegerFieldrB   	CharFieldrC   SerializerMethodFieldrD   rE   r@   r    r   r   r   r   r9   &   s    r9   c                   @   r$   )ProgramsSectionSerializerTr&   c                   @   r)   )zProgramsSectionSerializer.Meta)r*   descriptionhas_doctoral_programsprogramsN)r   r   r   r	   r   r   r   r   r   r   r    8   r/   r    N)r   r   r   r9   rL   r    r   r   r   r   rI   5   r0   rI   c                   @   r   )FeatureSerializerc                   @   r   )zFeatureSerializer.Metar   N)r   r   r   r   r   r   r   r   r   r   r    =   r!   r    Nr"   r   r   r   r   rM   <   r#   rM   c                   @   r$   )WhyChooseSectionSerializerTr&   c                   @   r)   )zWhyChooseSectionSerializer.Meta)r*   rJ   
conclusionr4   featuresN)r   r   r   r   r   r   r   r   r   r   r    D   r/   r    N)r   r   r   rM   rP   r    r   r   r   r   rN   A   r0   rN   c                   @   r   )FacultySerializerc                   @   r)   )zFacultySerializer.Meta)r7   position
departmentqualificationsr4   N)r   r   r   r   r   r   r   r   r   r   r    I   r/   r    Nr"   r   r   r   r   rQ   H   r#   rQ   c                   @   r$   )FacultySectionSerializerTr&   c                   @   r)   )zFacultySectionSerializer.Meta)r*   rJ   faculty_membersN)r   r   r   r   r   r   r   r   r   r   r    P   r/   r    N)r   r   r   rQ   rV   r    r   r   r   r   rU   M   r0   rU   c                   @   r   )TestimonialSerializerc                   @   r)   )zTestimonialSerializer.Meta)r7   r<   companytestimonialr4   N)r   r   r   r   r   r   r   r   r   r   r    U   r/   r    Nr"   r   r   r   r   rW   T   r#   rW   c                   @   r$   )TestimonialSectionSerializerTr&   c                   @      e Zd ZeZddgZdS )z!TestimonialSectionSerializer.Metar*   testimonialsN)r   r   r   r   r   r   r   r   r   r   r    \   r/   r    N)r   r   r   rW   r\   r    r   r   r   r   rZ   Y   r0   rZ   c                   @   r   )RecruiterSerializerc                   @   r[   )zRecruiterSerializer.Metar7   logoN)r   r   r   r   r   r   r   r   r   r   r    a   r/   r    Nr"   r   r   r   r   r]   `   r#   r]   c                   @   r$   )RecruitersSectionSerializerTr&   c                   @   r[   )z RecruitersSectionSerializer.Metar*   
recruitersN)r   r   r   r   r   r   r   r   r   r   r    h   r/   r    N)r   r   r   r]   r`   r    r   r   r   r   r_   e   r0   r_   c                   @   r   )FacilitySerializerc                   @   r)   )zFacilitySerializer.Meta)r*   rJ   r4   N)r   r   r   r   r   r   r   r   r   r   r    m   r/   r    Nr"   r   r   r   r   ra   l   r#   ra   c                   @   r$   )InfrastructureSectionSerializerTr&   c                   @   r)   )z$InfrastructureSectionSerializer.Meta)r*   rJ   
facilitiesN)r   r   r   r   r   r   r   r   r   r   r    t   r/   r    N)r   r   r   ra   rc   r    r   r   r   r   rb   q   r0   rb   c                   @   st   e Zd ZeddZeddZeddZe	ddZ
eddZeddZeddZeddZeddZG dd dZdS )CollegeSerializerT)r(   c                   @   r)   )zCollegeSerializer.Meta)idr7   r=   short_descriptionpriority_orderhero_sectionabout_sectiondirector_sectionprograms_sectionwhy_choose_sectionfaculty_sectiontestimonial_sectionrecruiters_sectioninfrastructure_sectionN)r   r   r   r   r   r   r   r   r   r   r       r/   r    N)r   r   r   r%   rh   r3   ri   r6   rj   rI   rk   rN   rl   rU   rm   rZ   rn   r_   ro   rb   rp   r    r   r   r   r   rd   x   s    








rd   N)(rest_frameworkr   colleges.modelsr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   ModelSerializerr   r%   r1   r3   r6   r9   rI   rM   rN   rQ   rU   rW   rZ   r]   r_   ra   rb   rd   r   r   r   r   <module>   s(    P