# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-04-11 18:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('FIO', models.CharField(max_length=150, verbose_name='ФИО')),
                ('t_number', models.CharField(max_length=10, verbose_name='Номер телефона')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.CharField(max_length=150, verbose_name='Ученая степень')),
                ('FIO', models.CharField(max_length=150, verbose_name='ФИО')),
                ('t_number', models.CharField(max_length=10, verbose_name='Номер телефона')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Почта')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UnivGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_name', models.CharField(max_length=15, unique=True, verbose_name='Название')),
                ('faculty', models.CharField(max_length=150, verbose_name='Факультет')),
                ('pulpit', models.CharField(max_length=150, verbose_name='Кафедра')),
                ('curator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Teacher')),
            ],
        ),
        migrations.AddField(
            model_name='student',
            name='univ_group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.UnivGroup'),
        ),
        migrations.AddField(
            model_name='student',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
