# Generated by Django 2.0.7 on 2018-08-03 09:57

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course_title', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('document', models.FileField(upload_to='uploads/')),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Grades',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='GradesReport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('grade_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Courses.Grades')),
            ],
        ),
        migrations.CreateModel(
            name='Lab',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lab_title', models.CharField(max_length=200)),
                ('lab_number', models.IntegerField()),
                ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Courses.Course')),
            ],
            options={
                'ordering': ('lab_number',),
            },
        ),
        migrations.CreateModel(
            name='LabTasks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_number', models.IntegerField()),
                ('comment', models.TextField()),
                ('note', models.TextField(blank=True, null=True)),
                ('task', models.TextField()),
                ('hint', models.TextField(blank=True, null=True)),
                ('lab_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Courses.Lab')),
            ],
            options={
                'ordering': ('lab_id', 'task_number'),
            },
        ),
        migrations.CreateModel(
            name='MainModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=42)),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Courses.Document')),
            ],
        ),
        migrations.AddField(
            model_name='gradesreport',
            name='lab_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Courses.Lab'),
        ),
        migrations.AddField(
            model_name='gradesreport',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
