Files
Flagman/student/migrations/0001_initial.py
Dmitriy 60b4e0e839 init
2025-06-23 01:24:34 +03:00

42 lines
1.8 KiB
Python

# Generated by Django 5.0.2 on 2025-06-10 19:27
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Student',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('medical_certificate', models.FileField(blank=True, null=True, upload_to='medical_certificates/')),
('driving_license_number', models.CharField(blank=True, max_length=20)),
('progress', models.IntegerField(default=0, help_text='Прогресс обучения в процентах')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='accounts.profile')),
],
),
migrations.CreateModel(
name='StudentProgress',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('theory_progress', models.IntegerField(default=0)),
('practice_progress', models.IntegerField(default=0)),
('last_lesson_date', models.DateTimeField(blank=True, null=True)),
('notes', models.TextField(blank=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.student')),
],
),
]