# Generated by Django 4.1.1 on 2022-09-20 08:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Groups',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=50, unique=True, verbose_name='Обозначение')),
                ('graduation_at', models.CharField(max_length=4, verbose_name='Год выпуска')),
            ],
            options={
                'verbose_name': 'Группа',
                'verbose_name_plural': 'Группы',
                'ordering': ['-graduation_at', 'title'],
            },
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surname', models.CharField(max_length=30, verbose_name='Фамилия')),
                ('name', models.CharField(max_length=20, verbose_name='Имя')),
                ('patronymic', models.CharField(blank=True, max_length=25, verbose_name='Отчество')),
                ('birthdate', models.DateField(blank=True, verbose_name='День рождения')),
                ('gender', models.CharField(choices=[('муж.', 'Мужчина'), ('жен.', 'Женщина')], default='муж.', max_length=4, verbose_name='Пол')),
                ('phone', models.CharField(blank=True, max_length=20, verbose_name='Номер телефона')),
                ('e_mail', models.CharField(blank=True, max_length=70, verbose_name='Электронная почта')),
                ('added_at', models.DateTimeField(auto_now_add=True, verbose_name='Добавлен')),
                ('slug', models.SlugField(allow_unicode=True, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Students',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surname', models.CharField(max_length=30, verbose_name='Фамилия')),
                ('name', models.CharField(max_length=20, verbose_name='Имя')),
                ('patronymic', models.CharField(blank=True, max_length=25, verbose_name='Отчество')),
                ('birthdate', models.DateField(blank=True, verbose_name='День рождения')),
                ('gender', models.CharField(choices=[('муж.', 'Мужчина'), ('жен.', 'Женщина')], default='муж.', max_length=4, verbose_name='Пол')),
                ('phone', models.CharField(blank=True, max_length=20, verbose_name='Номер телефона')),
                ('e_mail', models.CharField(blank=True, max_length=70, verbose_name='Электронная почта')),
                ('added_at', models.DateTimeField(auto_now_add=True, verbose_name='Добавлен')),
                ('slug', models.SlugField(allow_unicode=True, unique=True)),
                ('photo', models.ImageField(upload_to='photos/%Y/%m/%d/', verbose_name='Фото')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.groups', verbose_name='Группа')),
            ],
            options={
                'verbose_name': 'Студента',
                'verbose_name_plural': 'Студенты',
                'ordering': ['group', 'surname', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Emploees',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surname', models.CharField(max_length=30, verbose_name='Фамилия')),
                ('name', models.CharField(max_length=20, verbose_name='Имя')),
                ('patronymic', models.CharField(blank=True, max_length=25, verbose_name='Отчество')),
                ('birthdate', models.DateField(blank=True, verbose_name='День рождения')),
                ('gender', models.CharField(choices=[('муж.', 'Мужчина'), ('жен.', 'Женщина')], default='муж.', max_length=4, verbose_name='Пол')),
                ('phone', models.CharField(blank=True, max_length=20, verbose_name='Номер телефона')),
                ('e_mail', models.CharField(blank=True, max_length=70, verbose_name='Электронная почта')),
                ('added_at', models.DateTimeField(auto_now_add=True, verbose_name='Добавлен')),
                ('slug', models.SlugField(allow_unicode=True, unique=True)),
                ('photo', models.ImageField(upload_to='photos/%Y/%m/%d/', verbose_name='Фото')),
                ('group', models.ManyToManyField(to='main.groups', verbose_name='Группы')),
            ],
            options={
                'verbose_name': 'Сотрудника',
                'verbose_name_plural': 'Сотрудники',
                'ordering': ['surname', 'name'],
            },
        ),
    ]
