Private
Public Access
1
0

adding plannedsessionstep model

This commit is contained in:
Sander Roosendaal
2022-04-05 10:15:31 +02:00
parent f49ba3b36a
commit 61884d9a00
2 changed files with 43 additions and 3 deletions

View File

@@ -2391,6 +2391,41 @@ regularsessiontypechoices = (
)
# model for Planned Session (Workout, Challenge, Test)
class PlannedSessionStep(models.Model):
intensitytypes = (
("Active", "Active"),
("Rest", "Rest"),
("Warmup", "Warmup"),
("Cooldown", "Cooldown")
)
durationtypes = (
("Distance", "Distance"),
("Time", "Time")
)
targettypes = (
("Speed", "Speed"),
("HeartRate", "HeartRate"),
("Cadence", "Cadence"),
("Power", "Power")
)
manager = models.ForeignKey(User, null=True, on_delete=models.CASCADE)
name = models.TextField(default='',max_length=200, blank=True, null=True)
type = models.TextField(default='',max_length=200, blank=True, null=True)
durationvalue = models.IntegerField(default=0)
durationtype = models.TextField(default='',max_length=200, blank=True, null=True,
choices=durationtypes)
targetvalue = models.IntegerField(default=0)
targettype = models.TextField(default='',max_length=200, blank=True, null=True,
choices=targettypes)
customtargetvaluelow = models.IntegerField(default=0)
customtargetvaluehigh = models.IntegerField(default=0)
intensity = models.TextField(default='',max_length=200, blank=True, null=True,
choices=intensitytypes)
notes = models.TextField(default='',max_length=200, blank=True, null=True)
color = models.TextField(default='gray',max_length=200)
class PlannedSession(models.Model):