# Generated by Django 4.1.1 on 2022-10-11 09:25

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0009_contracts_agreement_date'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order_types',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150, verbose_name='Наименование')),
                ('body', models.TextField(verbose_name='Текст до таблицы')),
                ('footer', models.TextField(verbose_name='Заключение')),
            ],
        ),
        migrations.AlterModelOptions(
            name='diplomas',
            options={'verbose_name': 'Диплом', 'verbose_name_plural': 'Дипломы'},
        ),
        migrations.AlterModelOptions(
            name='passports',
            options={'verbose_name': 'Паспорт', 'verbose_name_plural': 'Паспорта'},
        ),
        migrations.AddField(
            model_name='structures',
            name='rector',
            field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Ректор'),
        ),
        migrations.AlterField(
            model_name='diplomas',
            name='series',
            field=models.CharField(max_length=8, verbose_name='Серия'),
        ),
        migrations.AlterField(
            model_name='passports',
            name='series',
            field=models.CharField(max_length=5, verbose_name='Серия'),
        ),
        migrations.AlterField(
            model_name='students',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=True, populate_from='title', unique=True),
        ),
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(blank=True, max_length=50, verbose_name='Номер')),
                ('registered', models.DateField(blank=True, verbose_name='от')),
                ('event_date', models.DateField(verbose_name='дата вступления в силу')),
                ('emploees', models.ManyToManyField(blank=True, to='main.emploees', verbose_name='Сотрудники')),
                ('structure', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.structures', verbose_name='Текущая структура')),
                ('students', models.ManyToManyField(blank=True, to='main.students', verbose_name='Студенты')),
                ('type_order', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.order_types', verbose_name='Тип приказа')),
            ],
        ),
    ]
