# Generated by Django 4.1.1 on 2022-10-10 09:16

import autoslug.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0007_alter_structures_options_alter_students_photo'),
    ]

    operations = [
        migrations.CreateModel(
            name='Diplomas',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('series', models.CharField(max_length=4, verbose_name='Серия')),
                ('number', models.CharField(max_length=20, verbose_name='Номер')),
                ('issued_date', models.DateField(verbose_name='Дата выдачи')),
            ],
        ),
        migrations.CreateModel(
            name='Passports',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('series', models.CharField(max_length=4, verbose_name='Серия')),
                ('number', models.CharField(max_length=20, verbose_name='Номер')),
                ('issued_date', models.DateField(verbose_name='Дата выдачи')),
                ('issued_department', models.CharField(max_length=50, verbose_name='Наименование подразделения')),
                ('address_registration', models.TextField(verbose_name='Адрес проживания')),
            ],
        ),
        migrations.AlterModelOptions(
            name='students',
            options={'ordering': ['surname', 'name'], 'verbose_name': 'Студента', 'verbose_name_plural': 'Студенты'},
        ),
        migrations.AddField(
            model_name='students',
            name='snils',
            field=models.CharField(blank=True, max_length=50, verbose_name='Номер СНИЛС'),
        ),
        migrations.AlterField(
            model_name='students',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=True, populate_from='title'),
        ),
        migrations.AddField(
            model_name='students',
            name='diploma',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.diplomas', verbose_name='Диплом'),
        ),
        migrations.AddField(
            model_name='students',
            name='passport',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.passports', verbose_name='Паспорт'),
        ),
    ]
