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
61 lines
2.8 KiB
Python
61 lines
2.8 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'),
|
|
('wrestlers', '0001_initial'),
|
|
('clubs', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Homework',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=200)),
|
|
('description', models.TextField(blank=True)),
|
|
('target_group', models.CharField(choices=[('kids', 'Kids'), ('youth', 'Youth'), ('adults', 'Adults'), ('all', 'All')], default='all', max_length=20)),
|
|
('due_date', models.DateField(blank=True, null=True)),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('club', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_assignments', to='clubs.club')),
|
|
('exercises', models.ManyToManyField(related_name='homework_assignments', to='exercises.exercise')),
|
|
],
|
|
options={
|
|
'ordering': ['-created_at'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='HomeworkStatus',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('is_completed', models.BooleanField(default=False)),
|
|
('completion_date', models.DateField(blank=True, null=True)),
|
|
('notes', models.TextField(blank=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('homework', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='statuses', to='homework.homework')),
|
|
('wrestler', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='homework_statuses', to='wrestlers.wrestler')),
|
|
],
|
|
options={
|
|
'unique_together': {('homework', 'wrestler')},
|
|
},
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='homework',
|
|
index=models.Index(fields=['target_group'], name='homework_ho_target__66652f_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='homework',
|
|
index=models.Index(fields=['due_date'], name='homework_ho_due_dat_5d3fcb_idx'),
|
|
),
|
|
]
|