# Generated by Django 2.2.4 on 2019-09-05 04:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('portal_users', '0015_auto_20190904_1432'),
        ('organizations', '0017_studyplan_language'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='studyplan',
            name='language',
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('uid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='Уникальный идентификатор')),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('deleted', models.DateTimeField(blank=True, null=True)),
                ('name', models.CharField(max_length=200, verbose_name='Название')),
                ('year', models.IntegerField(blank=True, null=True, verbose_name='Год')),
                ('headman', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='my_groups', to='portal_users.Profile', verbose_name='Староста')),
                ('kurator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal_users.Profile', verbose_name='Куратор')),
                ('language', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='organizations.Language', verbose_name='Язык обучения')),
                ('supervisor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='supervisor_groups', to='portal_users.Profile', verbose_name='Супервизор')),
            ],
            options={
                'verbose_name': 'Группа',
                'verbose_name_plural': 'Группы',
            },
        ),
        migrations.AddField(
            model_name='studyplan',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='organizations.Group', verbose_name='Группа'),
        ),
    ]
