
    6ch                     >   d dl mZ d dl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 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)    )models)slugifyc                       e Zd ZdZ ej
                  d      Z ej                  dd      Z ej
                  d      Z	 ej                         Z ej
                  d      Z ej
                  d      Z ej                  ddd	      Z ej                   d
      Z ej                   d      Z fdZd Z xZS )Coursez3Main course model representing educational programs   
max_lengthT)r	   uniquei  d   zcourses/banners/	upload_toblanknull)auto_now_add)auto_nowc                 p    | j                   st        | j                        | _         t        |   |i | y N)slugr   titlesupersave)selfargskwargs	__class__s      #/var/www/apihucms/courses/models.pyr   zCourse.save   s+    yy

+DId%f%    c                     | j                   S r   )r   r   s    r   __str__zCourse.__str__   s    zzr   )__name__
__module____qualname____doc__r   	CharFieldr   	SlugFieldr   short_description	TextFieldoverviewdurationcategory
ImageFieldbanner_imageDateTimeField
created_at
updated_atr   r    __classcell__)r   s   @r   r   r      s    =F,E6s48D(((C8v!Hv3/Hv3/H$6$$/ATXYL%%%48J%%%t4J&
r   r   c                       e Zd ZdZ ej
                  eej                  d      Z ej                         Z
 ej                         Z ej                         Zd Zy)CourseEligibilityz!Eligibility criteria for a courseeligibility	on_deleterelated_namec                 4    d| j                   j                   S )NzEligibility for courser   r   s    r   r    zCourseEligibility.__str__!       !$++"3"3!455r   N)r!   r"   r#   r$   r   OneToOneFieldr   CASCADEr:   r(   academic_qualificationminimum_marksentrance_examr     r   r   r3   r3      sV    +!V!!&FNNQ^_F-V--/$F$$&M$F$$&M6r   r3   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Zd Zy)	CourseFeezFee structure for a coursefeesr5   r   r   c                 4    d| j                   j                   S )Nz	Fees for r9   r   s    r   r    zCourseFee.__str__+   s    4;;,,-..r   N)r!   r"   r#   r$   r   r<   r   r=   r:   r%   domesticinternationalr    rA   r   r   rC   rC   %   sI    $!V!!&FNNQWXFv3/H$F$$4M/r   rC   c                   8   e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Z ej                  d      Z ej                  d      Z ej                  d      Z ej                  d      Zd Zy	)
	FeeDetailzDetailed fee breakdown by yeardetailsr5   r   r   Fdefaultc                 `    | j                    d| j                  j                  j                   S )Nz for )fee_head
course_feer:   r   r   s    r   r    zFeeDetail.__str__9   s(    --doo&<&<&B&B%CDDr   N)r!   r"   r#   r$   r   
ForeignKeyrC   r=   rO   r%   rN   
first_yearsecond_year
third_yearfourth_yearBooleanFieldis_one_timer    rA   r   r   rI   rI   /   s    ("""9U^_Jv3/H!!!S1J"&""c2K!!!S1J"&""c2K%&%%e4KEr   rI   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  dd      Z ej                  dd      Z ej                  d      Zd	 Zy
)	HostelFeezHostel fee structure
hostel_feer5   r   r   Tr	   r   r   c                 4    d| j                   j                   S )NzHostel fees for r9   r   s    r   r    zHostelFee.__str__E   r;   r   N)r!   r"   r#   r$   r   r<   r   r=   r:   r%   fee_per_yearac_room_additionalsecurity_depositr(   notesr    rA   r   r   rX   rX   =   ss    !V!!&FNNQ]^F#6##s3L)))SE'v''3dCF4(E6r   rX   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                         Z G d d      Zd Zy	)
SemesterzSemester in a course	semestersr5   r   r   c                       e Zd ZdgZy)Semester.MetanumberN)r!   r"   r#   orderingrA   r   r   Metare   O   s	    :r   rh   c                 L    | j                    d| j                  j                   S Nz - namer:   r   r   s    r   r    zSemester.__str__R   "    ))C 1 1233r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   rl   PositiveSmallIntegerFieldrf   rh   r    rA   r   r   rb   rb   I   sP    VvkZF6s+D-V--/F 4r   rb   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Z ej                         Z ej                         Zd Zy)	SubjectzSubject in a semestersubjectsr5      r   r   c                 8    | j                    d| j                   S rj   )coderl   r   s    r   r    zSubject.__str__^   s    ))C		{++r   N)r!   r"   r#   r$   r   rP   rb   r=   semesterr%   rt   rl   rn   creditsr(   descriptionr    rA   r   r   rp   rp   V   si     v  V^^R\]H6r*D6s+D.f..0G"&""$K,r   rp   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  dd      Z ej                  d	      Zd
 Zy)CareerProspectz0Career opportunities after completing the coursecareer_prospectsr5   r   r   r   TrZ   r[   c                 L    | j                    d| j                  j                    S rj   r   r:   r   s    r   r    zCareerProspect.__str__i   "    **S!2!2 344r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   r   salary_ranger(   rw   r    rA   r   r   ry   ry   b   s]    :VvN`aFF,E#6##s$?L"&"".K5r   ry   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Zd Zy	)
	Recruiterz/Companies that recruit students from the course
recruitersr5   r   r   zcourses/recruiters/r   c                 L    | j                    d| j                  j                   S rj   rk   r   s    r   r    zRecruiter.__str__s   rm   r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   rl   r,   logor    rA   r   r   r   r   m   sI    9Vvl[F6s+D6'<=D4r   r   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                         Zd Zy)WhyJoinzReasons to join the coursewhy_joinr5   r   r   c                 L    | j                    d| j                  j                    S rj   r|   r   s    r   r    zWhyJoin.__str__}   r}   r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   r   r(   rw   r    rA   r   r   r   r   w   sF    $VvjYFF,E"&""$K5r   r   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Z ej                  dd	      Zd
 Zy)CourseHighlightzKey highlights of the course
highlightsr5   r   r   Tr[   2   rZ   c                 L    | j                    d| j                  j                    S rj   r|   r   s    r   r    zCourseHighlight.__str__   r}   r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   r   r(   rw   iconr    rA   r   r   r   r      s\    &Vvl[FF,E"&"".K6r6D5r   r   c                       e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Z ej                  d	      Zd
 Zy)CourseImagezImages related to the courseimagesr5   zcourses/gallery/r   r   r   FrK   c                 L    | j                    d| j                  j                    S rj   r|   r   s    r   r    zCourseImage.__str__   r}   r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r,   imager%   r   rU   	is_bannerr    rA   r   r   r   r      s[    &VvhWFF(:;EF,E###E2I5r   r   c                      e Zd ZdZ ej
                  eej                  d      Z ej                  d      Z
 ej                  d      Z ej                  d      Z ej                         Z ej                  ddd      Zd	 Zy
)Testimonialz%Student testimonials about the coursetestimonialsr5   r   r   zcourses/testimonials/Tr   c                 L    | j                    d| j                  j                   S rj   rk   r   s    r   r    zTestimonial.__str__   rm   r   N)r!   r"   r#   r$   r   rP   r   r=   r:   r%   rl   positioncompanyr(   contentr,   photor    rA   r   r   r   r      s    /Vvn]F6s+Dv3/Hf#.Gf GF(?tRVWE4r   r   N)	django.dbr   django.utils.textr   Modelr   r3   rC   rI   rX   rb   rp   ry   r   r   r   r   r   rA   r   r   <module>r      s     %V\\ *6 6/ /E E	6 	6
4v|| 
4	,fll 	,5V\\ 54 45fll 55fll 55&,, 5
4&,, 
4r   