3fefc550fe
- Django backend with DRF (clubs, wrestlers, trainers, exercises, templates, trainings, homework, locations, leistungstest) - Next.js 16 frontend with React, Shadcn UI, Tailwind - JWT authentication - Full CRUD for all entities - Calendar view for trainings - Homework management system - Leistungstest tracking
54 lines
2.1 KiB
Python
54 lines
2.1 KiB
Python
# Generated by Django 4.2.29 on 2026-03-19 09:05
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('exercises', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='TemplateExercise',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('order', models.PositiveIntegerField(default=0)),
|
|
('default_value', models.CharField(blank=True, max_length=50)),
|
|
('exercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exercises.exercise')),
|
|
],
|
|
options={
|
|
'ordering': ['order'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='TrainingTemplate',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=200)),
|
|
('description', models.TextField(blank=True)),
|
|
('category', models.CharField(choices=[('warmup', 'Warm-up'), ('main', 'Main'), ('cooldown', 'Cool-down')], default='main', max_length=20)),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('exercises', models.ManyToManyField(related_name='templates', through='templates.TemplateExercise', to='exercises.exercise')),
|
|
],
|
|
options={
|
|
'ordering': ['name'],
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='templateexercise',
|
|
name='template',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='templates.trainingtemplate'),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='templateexercise',
|
|
unique_together={('template', 'exercise')},
|
|
),
|
|
]
|