U
    njc2                     @   s  d dl mZ d dlmZ d dlmZ d dl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!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%d1S )2    )models)Organization)User)ProgramTypeVideosGoals	protocolsExercisePlanPurposesPlanAbilitiesCountryc                   @   s  e Zd Zeje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dej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dZejddd
ZejddddZejddddej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dejdZ,dS )Plan	on_delete   F)
max_lengthblankTr   nulldefault)r   r   r   r   r   r   d   r   r   r      selfZslef_id)related_namer   r   r   Zoriginal_plannerr   r   r   r   r   Z
pl_creatorZpl_modifierauto_now_addauto_nowZslef_planId)r   r   r   N)-__name__
__module____qualname__r   
ForeignKeyr   CASCADEZprogramType	CharFieldZplanName	TextFieldZplanDescriptionBooleanFieldZ
planStatusr   planGoalDateTimeFieldZpublishDateIntegerFieldpriceabilityZnum_of_periodsZnum_of_sessionsgoalsZlicencePolicyduration_weeksZ	planPhotoZoriginalPlanIdr   ZoriginalPlannerZroyaltyZproposedStateZactivationStatusZplanLogoZiosPrice
FloatFieldZindianPriceZindianIosPriceZ	iosStatusZadvPlan	createdBy
modifiedBycreatedDateupdatedDateZcopyPlan r7   r7   %/var/www/html/services/Plan/models.pyr   	   s<   r   c                   @   sn   e Z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e
dejdZejddZejddZd	S )

PlanVideosTr   r   r   )r   r   Zplvideor   Z
plvideoModr   r!   N)r#   r$   r%   r   r&   r   r'   videor   planr   r3   r4   r,   r5   modifiedDater7   r7   r7   r8   r9   )   s   r9   c                   @   s   e Zd ZejeejdZejddddZ	ej
ddZejdddZejddZejd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 )PlanPeriodsr      Tr   r   r   r   Zpperiodr   ZppModr   r!   N)r#   r$   r%   r   r&   r   r'   r<   r(   Z
periodNamer*   statusr)   descriptionr-   Znum_of_mesocyclesr1   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   r>   1   s   r>   c                   @   s~   e Zd ZejeejdZejddZ	ej
ddZej
d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 )PlanMesocycler   Tr   r   r   Zpmmeso1r   Zpmmod1r   r!   N)r#   r$   r%   r   r&   r>   r'   periodr*   r@   r-   Znum_of_microcyclesr1   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   rB   =   s   rB   c                   @   s   e Zd ZejeejdZejddZ	ej
ddZejdddZejdd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 )
Microcycler   Tr   r   r   r?   r   Zmicr   Zmodmicr   r!   N)r#   r$   r%   r   r&   rB   r'   	mesocycler*   r@   r-   Zno_of_sessionsr2   	totalInolr(   ZdayOffr   r3   r4   r,   r5   r=   r7   r7   r7   r8   rD   G   s   rD   c                   @   s   e Zd Zejeej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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 )PlanSessionr   Tr   r   r   F)r   r   Zplsr   Zmodplsr   r!   N)r#   r$   r%   r   r&   rD   r'   
microcycler*   r@   r-   Zno_of_excersicesrestTimer2   rF   repeatr   r3   r4   r,   r5   r=   r7   r7   r7   r8   rG   R   s   rG   c                   @   s  e Zd ZejeddejdZejeejdZ	ej
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ZejdddZej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edd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Z ejddZ!ejdddZ"ejd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 )PlanExcerciseTZEx)r   r   r   r   r   r      r      r   r   r   ZTransEx)r   r   r   r   r   Fr   per   Zmodper   r!   N)*r#   r$   r%   r   r&   r	   r'   exerciseNamerG   sessionr*   r@   r-   Znum_of_setsnum_of_repsZ	extra_setr2   rF   	intensityZintensityRangerI   SmallIntegerFieldZwarmupr(   Z
warmupTyper)   ZspecificInstructionr/   ZtransitExerciseZtransitLeveladvExerciseexWeight
exDistanceexTimespeedheightr   r3   r4   r,   r5   r=   r7   r7   r7   r8   rK   ^   s4   rK   c                   @   s   e Zd ZejeejdZejddZ	ej
ddZej
ddZejddddZejdddZejddZej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dZejd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 )PlanSetsr   Tr   rL   r   )r   r   r   r   FrN   Zpsr   Zmodpsr   r!   N)r#   r$   r%   r   r&   rK   r'   	excerciser*   r@   r-   rR   Z	repsRangeZrepsRangeAbsr2   rF   rT   Z
allOutStatrI   rU   rV   rW   rX   rY   rZ   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   r[   z   s$   r[   c                   @   sR   e Zd ZejeejdZejeejdZ	ej
dddZejddZejddZdS )
PlanRatingr   Tr   r   r!   N)r#   r$   r%   r   r&   r   r'   r<   r   userr2   Zratingr,   r5   ZmodifiedDarer7   r7   r7   r8   r]      s
   r]   c                   @   s   e Zd ZejeejdZejeejdZ	eje
ddejdZejeddejdZejeddejdZejeddejdZejeddej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 )
PlanProtocolr   Tr:   ppr   Zmodppr   r!   N)r#   r$   r%   r   r&   r   r'   protocolr   r<   r	   exerciserB   rE   rD   rH   rK   Zuserexerciser[   setr)   valuesr   r3   r4   r,   r5   r=   r7   r7   r7   r8   r_      s   r_   c                   @   sh   e Zd Zeje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 )		PlanGoalsr   ZpGr   ZmGTr   r!   N)r#   r$   r%   r   r&   r
   r'   r+   r   r<   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   re      s   re   c                   @   sh   e Zd Zeje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 )	SelectedAbilitiesr   ZpAr   ZmApTr   r!   N)r#   r$   r%   r   r&   r   r'   r/   r   r<   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   rf      s   rf   c                   @   s   e Zd Zeje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 )DraftedPlanr   Tr   Fr   Zpbjr   ZpbjModr   r!   N)r#   r$   r%   r   OneToOneFieldr   r'   ZplanIdr)   ZplanJsonZprotocolJsonr*   r@   r&   r   r3   r4   r,   r5   r=   r7   r7   r7   r8   rg      s   rg   c                   @   s,   e Zd ZejeejdZejeejdZ	dS )PlanCountryr   N)
r#   r$   r%   r   r&   r   r'   r<   r   countryr7   r7   r7   r8   ri      s   ri   c                   @   s0   e Zd ZejeejdZe Z	ej
ddZdS )PlanCommentsr   r   r   N)r#   r$   r%   r   r&   r   r'   r<   r)   reiviewCommentsr-   r@   r7   r7   r7   r8   rk      s   rk   c                   @   s0   e Zd ZejeejdZejddZ	e
 ZdS )PlanShortUrlsr   r   )r   N)r#   r$   r%   r   r&   r   r'   r<   r(   ZshortUrlr)   ZlongUrlr7   r7   r7   r8   rm      s   rm   c                   @   s,   e Zd ZejeejdZejeejdZ	dS )
GymCountryr   N)
r#   r$   r%   r   r&   r   r'   Zgymr   rj   r7   r7   r7   r8   rn      s   rn   c                   @   s,   e Zd ZejeejdZejeejdZ	dS )CoachCountryr   N)
r#   r$   r%   r   r&   r   r'   Zcoachr   rj   r7   r7   r7   r8   ro      s   ro   c                   @   s$   e Zd Ze ZejeejdZ	dS )CategoryLevelr   N)
r#   r$   r%   r   r-   categoryr&   r   r'   ZmappedAbilityr7   r7   r7   r8   rp      s   rp   c                   @   s0   e Zd ZejeejdZe Zej	ddZ
dS )PlanExCommentsr   r   r   N)r#   r$   r%   r   r&   r	   r'   r)   rl   r-   r@   r7   r7   r7   r8   rr      s   rr   c                   @   sL   e Zd Zeje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 )MetabolicValuesr   TrN   N)r#   r$   r%   r   r&   r	   r'   rb   r)   	parameterr2   minValuemaxValueZ	metaValuer7   r7   r7   r8   rs      s
   rs   c                   @   sh   e Zd ZejeejdZeje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 )
PlanExTmaxr   TrN   N)r#   r$   r%   r   r&   r	   r'   rb   r   r<   r*   ZbaseDistanceZbaseRepsZbaseTimeZ
baseWeightr)   ZtamxContentr7   r7   r7   r8   rw      s   rw   N)&	django.dbr   StratFitOrganization.modelsr   Subscriber.modelsr   Zutility.modelsr   r   r   r   r	   r
   r   r   Modelr   r9   r>   rB   rD   rG   rK   r[   r]   r_   re   rf   rg   ri   rk   rm   rn   ro   rp   rr   rs   rw   r7   r7   r7   r8   <module>   s2   ( 

