# Generated by Django 4.1.1 on 2022-11-06 10:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0025_alter_groups_options_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='contracts',
            name='group',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='main.groups', verbose_name='Группа'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='contracts',
            name='client',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.students', verbose_name='Обучающийся'),
        ),
        migrations.AlterField(
            model_name='students',
            name='slug',
            field=models.SlugField(allow_unicode=True, unique=True),
        ),
        migrations.CreateModel(
            name='Customers',
            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)),
                ('name_cases', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.name_cases', verbose_name='падежи имени')),
                ('passport', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.passports', verbose_name='Паспорт')),
                ('patronymic_cases', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.patronymic_cases', verbose_name='падежи отчества')),
                ('surname_cases', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.surname_cases', verbose_name='падежи фамилии')),
            ],
            options={
                'verbose_name': 'Заказчика',
                'verbose_name_plural': 'Заказчики',
                'ordering': ['surname', 'name'],
            },
        ),
        migrations.AddField(
            model_name='contracts',
            name='сustomer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='main.customers', verbose_name='Заказчик'),
        ),
    ]
