mirror of
https://github.com/workhardbekind/workout-challenge.git
synced 2026-07-04 09:23:32 -04:00
74 lines
6.2 KiB
Python
74 lines
6.2 KiB
Python
# Generated by Django 5.2.7 on 2025-10-26 18:22
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ActivityGoal',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=60)),
|
|
('metric', models.CharField(choices=[('min', 'Time (Minutes)'), ('num', 'Number of times (x)'), ('kcal', 'Calories (Kcal)'), ('km', 'Distance (Km)'), ('kj', 'Effort (Kilojoules)')], max_length=4)),
|
|
('goal', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('period', models.CharField(choices=[('day', 'daily'), ('week', 'weekly'), ('month', 'monthly'), ('year', 'yearly'), ('competition', 'competition end')], default='day', max_length=12)),
|
|
('count_steps_as_walks', models.BooleanField(default=True)),
|
|
('min_per_workout', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('max_per_workout', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('min_per_day', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('max_per_day', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('min_per_week', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('max_per_week', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Award',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=60)),
|
|
('sport', models.CharField(choices=[('GROUP_ANY', 'Group: All Sports'), ('GROUP_RUNNING', 'Group: Running (Run / Trail / Treadmill)'), ('GROUP_BIKING', 'Group: Biking/Cycling (Except E-Bike)'), ('GROUP_WALKING', 'Group: Walking (Walk / Wheelchair / Elliptical / Stepper)'), ('GROUP_RACKET', 'Group: Racket Sports (Tennis / Squash / Badminton / Pickleball / Racquetball / Table Tennis)'), ('GROUP_SOCIAL', 'Group: Social Sports (Soccer / Golf)'), ('GROUP_CLASSES_CARDIO', 'Group: Cardio Gym Classes (Crossfit / HIIT)'), ('GROUP_CLASSES_MINDFUL', 'Group: Mindfulness Classes (Yoga / Pilates)'), ('GROUP_WATER_ACTIVE', 'Group: Active Water Sports (Swim / Canoe / Kayak / Kitesurf / Rowing / Surfing / Windsurf)'), ('Steps', 'Total Daily Steps'), ('Badminton', 'Badminton'), ('Ride', 'Biking/Cycling'), ('EBikeRide', 'Biking/Cycling (E-Bike)'), ('GravelRide', 'Biking/Cycling (Gravel)'), ('Handcycle', 'Biking/Cycling (Handcycle)'), ('Velomobile', 'Biking/Cycling (Velomobile)'), ('VirtualRide', 'Biking/Cycling (Virtual)'), ('Canoeing', 'Canoe'), ('Crossfit', 'Crossfit'), ('Elliptical', 'Elliptical'), ('Golf', 'Golf'), ('HighIntensityIntervalTraining', 'High Intensity Interval Training (HIIT)'), ('Hike', 'Hike'), ('IceSkate', 'Ice Skate'), ('InlineSkate', 'Inline Skate'), ('Kayaking', 'Kayak'), ('Kitesurf', 'Kitesurf'), ('MountainBikeRide', 'Mountain-Biking/Cycling'), ('EMountainBikeRide', 'Mountain-Biking/Cycling (E-Bike)'), ('Pickleball', 'Pickleball'), ('Pilates', 'Pilates'), ('Racquetball', 'Racquetball'), ('RockClimbing', 'Rock Climbing'), ('Rowing', 'Rowing (Outdoor)'), ('VirtualRow', 'Rowing (Virtual)'), ('Run', 'Run'), ('TrailRun', 'Run (Trail)'), ('VirtualRun', 'Run (Treadmill / Vitual)'), ('Sail', 'Sail'), ('Skateboard', 'Skateboard'), ('AlpineSki', 'Ski (Alpine)'), ('BackcountrySki', 'Ski (Backcountry)'), ('NordicSki', 'Ski (Nordic)'), ('RollerSki', 'Ski (Roller/Inliner)'), ('Snowboard', 'Snowboard'), ('Soccer', 'Soccer / Football'), ('Squash', 'Squash'), ('StairStepper', 'Stair Stepper'), ('StandUpPaddling', 'Stand-up Paddling'), ('Surfing', 'Surf'), ('Swim', 'Swim'), ('TableTennis', 'Table Tennis'), ('Tennis', 'Tennis'), ('Walk', 'Walk'), ('Snowshoe', 'Walk (Snowshoe)'), ('WeightTraining', 'Weight Training'), ('Wheelchair', 'Wheelchair'), ('Windsurf', 'Windsurf'), ('Yoga', 'Yoga'), ('Workout', 'Other Workout')], default='GROUP_ANY', max_length=40)),
|
|
('threshold', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('period', models.CharField(choices=[('day', 'daily'), ('week', 'weekly'), ('month', 'monthly'), ('year', 'yearly'), ('competition', 'competition end')], default='day', max_length=12)),
|
|
('reward_points', models.IntegerField()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Competition',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=60)),
|
|
('start_date', models.DateField()),
|
|
('end_date', models.DateField()),
|
|
('has_teams', models.BooleanField(default=False)),
|
|
('organizer_assigns_teams', models.BooleanField(default=False)),
|
|
('join_code', models.CharField(max_length=20, unique=True, validators=[django.core.validators.MinLengthValidator(10), django.core.validators.RegexValidator('^[a-zA-Z0-9]+$', message='Only letters and numbers allowed')])),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Points',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('points_raw', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('points_capped', models.DecimalField(decimal_places=2, max_digits=10, null=True)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Points',
|
|
'verbose_name_plural': 'Points',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Team',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=60)),
|
|
],
|
|
),
|
|
]
|