o
    f>d]K                     @   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 d dlmZ d dl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"G d)d* d*ejZ#G d+d, d,ejZ$G d-d. d.ejZ%G d/d0 d0ejZ&G d1d2 d2ejZ'G d3d4 d4ejZ(G d5d6 d6ejZ)G d7d8 d8ejZ*d9S ):    )models)	TrainingLevelPlanPurposesNewExerciseProgramTypeGoalsPlanAbilitiesCountryVideos	protocols)User)Organizationc                   @   s  e Zd ZejedejdZejdddZ	ej
dddZejddZejed	ejddd
ZejdddZejdddZej
dddZejddZej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ZejddddZejddejddd
ZejedejdZejdd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%ej$ddZ&ejddZ'ejddZ(ejedejdZ)ejedejdZ*ejddZ+ejddZ,ejddejddZ-dS )PlanZplanprelated_name	on_delete   F
max_lengthblankTr   nulldefaultZplanG)r   r   r   r   r   r   r   d   )r   r   r      selfZslefidZoriginalplanner)r   r   r   ZplancreatorZplanmodifierauto_now_addauto_nowZ
slefplanId)r   r   r   N).__name__
__module____qualname__r   
ForeignKeyr   CASCADEprogramType	CharFieldplanName	TextFieldplanDescriptionBooleanField
planStatusr   planGoalDateTimeFieldpublishDateIntegerFieldpriceabilitynum_of_periodsnum_of_sessionsgoalsotherslicencePolicyduration_weeks	planPhotooriginalPlanIdr   originalPlannerroyaltyproposedStateactivationStatusplanLogoiosPrice
FloatFieldindianPriceindianIosPrice	iosStatusadvPlan	createdBy
modifiedBycreatedDateupdatedDatecopyPlan rL   rL   vC:\Users\DELL\Desktop\soubhikg1894-stratfit-d75d91182fa3\soubhikg1894-stratfit-d75d91182fa3\services\Program\models.pyr      s@    r   c                   @   sl   e Zd ZejddddZejeddejdZ	eje
dejdZeje
dejdZejdd	Zejdd
ZdS )
PlanVideosTr   )r   r   r   ZplVideo)r   r   r   Zplavideor   ZplavideoModr   r    N)r"   r#   r$   r   r(   videor%   r   r&   planr   rG   rH   r/   rI   modifiedDaterL   rL   rL   rM   rN   '   s    rN   c                   @   sV   e Zd ZejedejdZejedejdZ	ej
dddZejddZejddZdS )	
PlanRatingZplratr   Z	plaratingTr   r   r    N)r"   r#   r$   r   r%   r   r&   rP   r   userrB   ratingr/   rI   modifiedDarerL   rL   rL   rM   rR   /   s    rR   c                   @   l   e Zd ZejedejdZejedejdZ	eje
dejdZeje
dejdZejddZejddZdS )		PlanGoalsr.   r   Z	planscrbyZmodGoalTr   r    N)r"   r#   r$   r   r%   r   r&   r.   r   rP   r   rG   rH   r/   rI   rQ   rL   rL   rL   rM   rW   7       rW   c                   @   sj   e Zd ZejedejdZejeejdZ	eje
dejdZeje
dejdZejddZejddZd	S )
SelectedAbilitiesZpAblprr   )r   ZpAprZmApprTr   r    N)r"   r#   r$   r   r%   r   r&   r3   r   rP   r   rG   rH   r/   rI   rQ   rL   rL   rL   rM   rY   ?   s    rY   c                   @   sl   e Zd ZejedejdZejedejdZ	eje
dejdZeje
dejdZejddZejddZd	S )

Plan_levelZ	pllcrplbyr   ZcrbyZpllcrrbyZpllmpdbyTr   r    N)r"   r#   r$   r   r%   r   r&   plan_idr   Ztraining_level_idr   
created_Bymodified_Byr/   created_Datemodified_DaterL   rL   rL   rM   rZ   G   s    rZ   c                   @   rV   )	Plan_PurposeZplpcrdbyr   Z	plpcrrdbyZplpmodbyTr   r    N)r"   r#   r$   r   r%   r   r&   r[   r   Z
purpose_idr   r\   r]   r/   r^   r_   rL   rL   rL   rM   r`   P   rX   r`   c                   @   s   e Zd ZejedejdZejddZ	ej
ddZe Zejddd	Zejdd
d	Ze Ze ZejedejdZejedejdZejddZejddZdS )Plan_PeriodZplperdcreatedbyr   (   r   Fr   r      r   r      ZplperdcrtbyZplperdmdfiedbyTr   r    N)r"   r#   r$   r   r%   r   r&   r[   r(   Zperiod_namer,   statusr*   descriptionpdc_id	parent_idr1   num_of_mesocyclesnum_of_microcyclesr   r\   r]   r/   r^   r_   rL   rL   rL   rM   ra   W   s    ra   c                   @   s   e Zd ZejedejdZejedejdZ	ej
ddZe Ze Zej
dddZej
dddZejd	d
ZejedejdZejedejdZejddZejddZdS )Plan_MesocycleZ
plmesocrbyr   Zplmesobyr   rc   rd   re   rf   Fr   Z	plmesolbyZ
plmesoplbyTr   r    N)r"   r#   r$   r   r%   r   r&   r[   ra   	period_idr(   Zmesocycles_namer*   rh   r1   rl   ri   rj   r,   rg   r   r\   r]   r/   r^   r_   rL   rL   rL   rM   rm   e   s    rm   c                   @   s   e Zd ZejedejdZejedejdZ	eje
dejdZejddZe ZejdddZejdd	dZejd
dZe Ze ZejedejdZejedejdZejddZejddZdS )Plan_MicrocyclesZplmicreatbyr   Z
plmimyplbyZ
plmimymsbyr   rc   rd   re   rf   Fr   Z
plmicrmcbyZ
plmimdmcbyTr   r    N)r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   meso_idr(   Z
micro_namer*   rh   ri   rj   r,   rg   r1   Znum_of_daysrB   
total_loadr   r\   r]   r/   r^   r_   rL   rL   rL   rM   ro   r   s    ro   c                   @   s   e Zd ZejedejdZejedejdZ	eje
dejdZejedejdZejddZe Zejdd	Zejd
ddZejd
ddZe Ze Ze ZejedejdZejedejdZejddZejddZ dS )	Plan_DaysZpldcrbyr   ZpldbyZpldmsbyZpldmibyrb   rc   Fr   r   rd   re   rf   ZpldmdbyTr   r    N)!r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   rp   ro   micro_idr(   day_namer*   rh   r,   rg   ri   rj   r1   r5   rB   rq   	rest_timer   r\   r]   r/   r^   r_   rL   rL   rL   rM   rr      s"    rr   c                   @   s   e Zd ZejedejdZejedejdZ	eje
dejdZejedejdZejedejdZejddZe Zejdd	d
Zejddd
ZejddZe Ze Ze ZejedejdZejedejdZej ddZ!ej ddZ"dS )Plan_SessionsZplscrbyr   ZplsbyZplsmsbyZplsmibyZplspdbyr   rc   rd   re   rf   Fr   ZplsmdbyTr   r    N)#r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   rp   ro   rs   rr   day_idr(   Zsession_namer*   rh   ri   rj   r,   rg   r1   Znum_of_exercisesrB   rq   ru   r   r\   r]   r/   r^   r_   rL   rL   rL   rM   rv      s$    rv   c                   @   s  e Zd ZejedejdZejedejdZ	eje
dejdZejedejdZejedejdZejedejdZejdd	Zejdd
dZejdddZejdddZe ZejddZe Ze ZejddZejedejdZ ejedejdZ!ej"d
dZ#ej"d
dZ$dS )Plan_ActivityZ	plactcrbyr   ZplactbyZ	plactmsbyZ	plactmibyZ	plactpdbyZ	plactpsbyr   rc   Tr   rd   re   rf   Fr   Z	plactmdbyr   r    N)%r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   rp   ro   rs   rr   rw   rv   
session_idr(   ZActivity_nameZActivity_typeri   rj   r*   rh   r,   rg   rB   rq   ru   Zwarm_upr   r\   r]   r/   r^   r_   rL   rL   rL   rM   rx      s(    rx   c                   @   s(  e Zd ZejedejdZejedejdZ	eje
dejdZejedejdZejedejdZejedejdZejedejdZejd	d
Zejd	ddZejd	ddZe Zejd	ddZejddZe Ze Z e Z!eje"dejdZ#eje"dejdZ$ej%ddZ&ej%ddZ'dS )
Plan_RoundZplan_round_crbyr   Zplan_round_byZplan_round_mesobyZplan_round_mibyZplan_round_daybyZplan_round_sessionbyZplan_round_act_byr   rc   rd   re   rf   Tr   Fr   ZplarcrbyZplarmdbyr   r    N)(r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   rp   ro   rs   rr   rw   rv   ry   rx   activity_idr(   Z
round_nameri   rj   r*   rh   Z
round_typer,   rg   r1   Znum_of_actionsrB   rq   ru   r   r\   r]   r/   r^   r_   rL   rL   rL   rM   rz      s*    rz   c                   @   s  e Zd ZejedejdZejedejdZ	eje
dejdZejedejdZejedejdZejedejdZejedejdZejedejdZejedejdZejdddZejdd	dZejdd
dZe Ze Ze Z e Z!e Z"e# Z$e Z%e& Z'e Z(ejddZ)ejddZ*ejddZ+e Z,e Z-e Z.ejddZ/ejddZ0ejddZ1ejddZ2ejddZ3e Z4eje5dejdZ6eje5dejdZ7ej8ddZ9ej8ddZ:dS )Plan_ActionsZplacrbyr   ZplabyZplamsbyZplamibyr   rd   re   rf   ZMainSetrc   r   r   ZplamdbyTr   r    N);r"   r#   r$   r   r%   r   r&   r[   ra   rn   rm   rp   ro   rs   rr   rw   rv   ry   rx   r{   rz   Zround_idr   exercise_idr(   ri   rj   Zaction_typerB   Zintensity_ranger1   num_of_setsZmin_repsZmax_repsZprescribed_repsr,   Zall_out	intensityr*   Zinstructionru   Zcalculated_abilityZintensity_levelZextra_abilityZhypertrophy_potencyZlactate_generate_potencyZstrength_speed_potencyZspeed_potencyZspeed_strength_potencyZmaxstrength_potencyZselected_RPEZstrength_potency_zoneZstrength_endurance_potencyr   r\   r]   r/   r^   r_   rL   rL   rL   rM   r|      sL    r|   c                   @   s   e Zd ZejedejdZejedejdZ	eje
dejdddZejedejdddZejedejdddZejed	ejdddZe Zejed
ejdZejedejdZejddZejddZdS )PlanProtocolZ	planprotor   Z
planprotosplanexerciseT)r   r   r   r   ZplanprotomesoZplanprotomicroZplandaysprotocolZplanpcrbyprotoZmodppcrbyprotor   r    N)r"   r#   r$   r   r%   r   r&   protocolr   rP   r   exerciserm   	mesocyclero   
microcyclerr   dayr*   valuesr   rG   rH   r/   rI   rQ   rL   rL   rL   rM   r      s    r   c                   @   s   e Zd ZejedejdZejdddZ	ejdddZ
ejddZejedejdZejedejdZejdd	Zejdd
ZdS )DraftedPlanZ	plansjsonr   Tr   Fr   ZdftcrtZdftModr   r    N)r"   r#   r$   r   OneToOneFieldr   r&   planIdr*   planJsonprotocolJsonr,   rg   r%   r   rG   rH   r/   rI   rQ   rL   rL   rL   rM   r     s    r   c                   @   0   e Zd ZejedejdZejedejdZ	dS )PlanCountryZplaCountrycrbyr   ZplaCountrycontryN)
r"   r#   r$   r   r%   r   r&   rP   r	   countryrL   rL   rL   rM   r         r   c                   @   2   e Zd ZejedejdZe Z	ej
ddZdS )PlanCommentsZ
placommentr   r   r   N)r"   r#   r$   r   r%   r   r&   rP   r*   reiviewCommentsr1   rg   rL   rL   rL   rM   r         r   c                   @   s2   e Zd ZejedejdZejddZ	e
 ZdS )PlanShortUrlsZ	planSurlsr   r   rc   N)r"   r#   r$   r   r%   r   r&   rP   r(   shortUrlr*   longUrlrL   rL   rL   rM   r     s    r   c                   @   r   )
GymCountryZplanOrgr   ZplanCouN)
r"   r#   r$   r   r%   r   r&   gymr	   r   rL   rL   rL   rM   r     r   r   c                   @   r   )CoachCountryZ	planCoachr   ZplanCountryN)
r"   r#   r$   r   r%   r   r&   coachr	   r   rL   rL   rL   rM   r   "  r   r   c                   @   s&   e Zd Ze ZejedejdZ	dS )CategoryLevelZplanCategoryr   N)
r"   r#   r$   r   r1   categoryr%   r   r&   mappedAbilityrL   rL   rL   rM   r   &  s    r   c                   @   r   )PlanExCommentsZplancommentr   r   r   N)r"   r#   r$   r   r%   r   r&   Exerciser*   r   r1   rg   rL   rL   rL   rM   r   *  r   r   c                   @   sN   e Zd ZejedejdZejddZ	ej
ddZej
ddZej
ddZdS )MetabolicValuesZplanmetar   Tr   N)r"   r#   r$   r   r%   r   r&   r   r*   	parameterrB   minValuemaxValue	metaValuerL   rL   rL   rM   r   /  s    r   c                   @   sl   e Zd ZejedejdZejedej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S )
PlanExTmaxrP   r   Tr   N)r"   r#   r$   r   r%   r   r&   r   r   rP   r,   baseDistancebaseRepsbaseTime
baseWeightr*   tamxContentrL   rL   rL   rM   r   6  s    r   N)+	django.dbr   utility.modelsr   r   r   r   r   r   r	   r
   r   Subscriber.modelsr   StratFitOrganization.modelsr   Modelr   rN   rR   rW   rY   rZ   r`   ra   rm   ro   rr   rv   rx   rz   r|   r   r   r   r   r   r   r   r   r   r   r   rL   rL   rL   rM   <module>   s<    ,!	'