# Generated by Django 2.0.1 on 2018-01-29 21:32

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='College',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('code', models.CharField(max_length=2, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('majors', models.ManyToManyField(to='tutorials.College')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudentTutorialStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('O', 'Owner'), ('P', 'Pending'), ('A', 'Approved'), ('R', 'Rejected')], max_length=1)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tutorials.Student')),
            ],
            options={
                'verbose_name_plural': 'Student-tutorial statuses',
            },
        ),
        migrations.CreateModel(
            name='Tutorial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=1000)),
                ('colleges', models.ManyToManyField(to='tutorials.College')),
            ],
        ),
        migrations.CreateModel(
            name='TutorialLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.URLField()),
                ('tutorial', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tutorials.Tutorial')),
            ],
        ),
        migrations.AddField(
            model_name='studenttutorialstatus',
            name='tutorial',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tutorials.Tutorial'),
        ),
        migrations.AlterUniqueTogether(
            name='studenttutorialstatus',
            unique_together={('tutorial', 'student')},
        ),
    ]
