U
    ?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   (/var/www/html/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                   @   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 )		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   rV   7   s   rV   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   rW   ?   s   rW   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   rX   G   s   rX   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_PurposeZplpcrdbyr   Z	plpcrrdbyZplpmodbyTr   r    N)r"   r#   r$   r   r%   r   r&   rY   r   Z
purpose_idr   rZ   r[   r/   r\   r]   rL   rL   rL   rM   r^   P   s   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&   rY   r(   Zperiod_namer,   statusr*   descriptionpdc_id	parent_idr1   num_of_mesocyclesnum_of_microcyclesr   rZ   r[   r/   r\   r]   rL   rL   rL   rM   r_   W   s   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
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   ra   rb   rc   rd   Fr   Z	plmesolbyZ
plmesoplbyTr   r    N)r"   r#   r$   r   r%   r   r&   rY   r_   	period_idr(   Zmesocycles_namer*   rf   r1   rj   rg   rh   r,   re   r   rZ   r[   r/   r\   r]   rL   rL   rL   rM   rk   e   s   rk   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   ra   rb   rc   rd   Fr   Z
plmicrmcbyZ
plmimdmcbyTr   r    N)r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   meso_idr(   Z
micro_namer*   rf   rg   rh   r,   re   r1   Znum_of_daysrB   
total_loadr   rZ   r[   r/   r\   r]   rL   rL   rL   rM   rm   r   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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pldmibyr`   ra   Fr   r   rb   rc   rd   ZpldmdbyTr   r    N)!r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   rn   rm   micro_idr(   day_namer*   rf   r,   re   rg   rh   r1   r5   rB   ro   	rest_timer   rZ   r[   r/   r\   r]   rL   rL   rL   rM   rp      s    rp   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   ra   rb   rc   rd   Fr   ZplsmdbyTr   r    N)#r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   rn   rm   rq   rp   day_idr(   Zsession_namer*   rf   rg   rh   r,   re   r1   Znum_of_exercisesrB   ro   rs   r   rZ   r[   r/   r\   r]   rL   rL   rL   rM   rt      s"   rt   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   ra   Tr   rb   rc   rd   Fr   Z	plactmdbyr   r    N)%r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   rn   rm   rq   rp   ru   rt   
session_idr(   ZActivity_nameZActivity_typerg   rh   r*   rf   r,   re   rB   ro   rs   Zwarm_upr   rZ   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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   ra   rb   rc   rd   Tr   Fr   ZplarcrbyZplarmdbyr   r    N)(r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   rn   rm   rq   rp   ru   rt   rw   rv   activity_idr(   Z
round_namerg   rh   r*   rf   Z
round_typer,   re   r1   Znum_of_actionsrB   ro   rs   r   rZ   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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   rb   rc   rd   ZMainSetra   r   r   ZplamdbyTr   r    N);r"   r#   r$   r   r%   r   r&   rY   r_   rl   rk   rn   rm   rq   rp   ru   rt   rw   rv   ry   rx   Zround_idr   exercise_idr(   rg   rh   Zaction_typerB   Zintensity_ranger1   num_of_setsZmin_repsZmax_repsZprescribed_repsr,   Zall_out	intensityr*   Zinstructionrs   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   rZ   r[   r/   r\   r]   rL   rL   rL   rM   rz      sJ   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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   exerciserk   	mesocyclerm   
microcyclerp   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,   re   r%   r   rG   rH   r/   rI   rQ   rL   rL   rL   rM   r     s   r   c                   @   s0   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     s   r   c                   @   s2   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   re   rL   rL   rL   rM   r     s   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   ra   N)r"   r#   r$   r   r%   r   r&   rP   r(   shortUrlr*   longUrlrL   rL   rL   rM   r     s   r   c                   @   s0   e Zd ZejedejdZejedejdZ	dS )
GymCountryZplanOrgr   ZplanCouN)
r"   r#   r$   r   r%   r   r&   gymr	   r   rL   rL   rL   rM   r     s   r   c                   @   s0   e Zd ZejedejdZejedejdZ	dS )CoachCountryZ	planCoachr   ZplanCountryN)
r"   r#   r$   r   r%   r   r&   coachr	   r   rL   rL   rL   rM   r   "  s   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                   @   s2   e Zd ZejedejdZe Z	ej
ddZdS )PlanExCommentsZplancommentr   r   r   N)r"   r#   r$   r   r%   r   r&   Exerciser*   r   r1   re   rL   rL   rL   rM   r   *  s   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   rV   rW   rX   r^   r_   rk   rm   rp   rt   rv   rx   rz   r~   r   r   r   r   r   r   r   r   r   r   rL   rL   rL   rM   <module>   s:   ,!	'