<gh_stars>0
# Generated by Django 4.0.1 on 2022-01-12 16:23

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dept',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Название')),
                ('abbreviation', models.CharField(max_length=10, verbose_name='Аббревиатура')),
            ],
            options={
                'verbose_name': 'Подразделение',
                'verbose_name_plural': 'Подразделение',
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Название')),
                ('abbreviation', models.CharField(max_length=10, verbose_name='Аббревиатура')),
            ],
            options={
                'verbose_name': 'Служба',
                'verbose_name_plural': 'Службы',
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_name', models.CharField(max_length=20, verbose_name='Фамилия')),
                ('first_name', models.CharField(max_length=20, verbose_name='Имя')),
                ('patronymic', models.CharField(max_length=20, verbose_name='Отчество')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='staff', to='staff.dept', verbose_name='Подразделение')),
            ],
            options={
                'verbose_name': 'Сотрудник',
                'verbose_name_plural': 'Сотрудники',
                'ordering': ('last_name',),
            },
        ),
        migrations.AddField(
            model_name='dept',
            name='service',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='departments', to='staff.service', verbose_name='Служба'),
        ),
    ]
