Initial commit: WrestleDesk full project

- 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
This commit is contained in:
Andrej Spielmann
2026-03-26 13:24:57 +01:00
commit 3fefc550fe
256 changed files with 38295 additions and 0 deletions
@@ -0,0 +1,94 @@
# Generated by Django 4.2.29 on 2026-03-23 12:43
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('wrestlers', '0002_alter_wrestler_license_scan_alter_wrestler_photo'),
('exercises', '0003_alter_exercise_media'),
]
operations = [
migrations.CreateModel(
name='LeistungstestResult',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('total_time_minutes', models.PositiveIntegerField(blank=True, null=True)),
('rating', models.PositiveSmallIntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)], default=3)),
('notes', models.TextField(blank=True)),
('completed_at', models.DateTimeField(default=django.utils.timezone.now)),
('created_at', models.DateTimeField(auto_now_add=True)),
],
options={
'ordering': ['-completed_at'],
},
),
migrations.CreateModel(
name='LeistungstestTemplate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],
options={
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='LeistungstestResultItem',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_reps', models.PositiveIntegerField()),
('actual_reps', models.PositiveIntegerField()),
('order', models.IntegerField(default=0)),
('exercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exercises.exercise')),
('result', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='leistungstest.leistungstestresult')),
],
options={
'ordering': ['result', 'order'],
},
),
migrations.AddField(
model_name='leistungstestresult',
name='template',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='leistungstest.leistungstesttemplate'),
),
migrations.AddField(
model_name='leistungstestresult',
name='wrestler',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leistungstest_results', to='wrestlers.wrestler'),
),
migrations.CreateModel(
name='LeistungstestTemplateExercise',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_reps', models.PositiveIntegerField()),
('order', models.IntegerField(default=0)),
('exercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exercises.exercise')),
('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercises', to='leistungstest.leistungstesttemplate')),
],
options={
'ordering': ['template', 'order'],
'unique_together': {('template', 'exercise')},
},
),
migrations.AddIndex(
model_name='leistungstestresult',
index=models.Index(fields=['wrestler'], name='leistungste_wrestle_f3f6c2_idx'),
),
migrations.AddIndex(
model_name='leistungstestresult',
index=models.Index(fields=['template'], name='leistungste_templat_daf98b_idx'),
),
migrations.AddIndex(
model_name='leistungstestresult',
index=models.Index(fields=['completed_at'], name='leistungste_complet_838820_idx'),
),
]