# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-06-12 14:48
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('topics', '0008_auto_20201017_0913'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='MaterialDelivery',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='topics.Resource')),
                ('presentation', models.TextField(blank=True, verbose_name='Presentation')),
                ('data_ini', models.DateTimeField(verbose_name='Init Date')),
                ('data_end', models.DateTimeField(verbose_name='End Date')),
            ],
            options={
                'verbose_name': 'Material',
                'verbose_name_plural': 'Materials',
            },
            bases=('topics.resource',),
        ),
        migrations.CreateModel(
            name='StudentDeliver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('delivery', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='student_deliver', to='material_delivery.MaterialDelivery', verbose_name='Material Delivery')),
                ('student', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='studentdeliver_user', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'Student Deliver',
                'verbose_name_plural': 'Students Deliver',
            },
        ),
        migrations.CreateModel(
            name='StudentMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commentary', models.TextField(blank=True, verbose_name='Commentary')),
                ('file', models.FileField(upload_to=material_delivery.models.get_upload_student_path, validators=[material_delivery.models.validate_file_extension], verbose_name='File')),
                ('upload_date', models.DateTimeField(auto_now_add=True, verbose_name='Upload Date')),
                ('deliver', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='material_deliver', to='material_delivery.StudentDeliver', verbose_name='Student Deliver')),
            ],
            options={
                'verbose_name': 'Student Material',
                'verbose_name_plural': 'Student Materials',
            },
        ),
        migrations.CreateModel(
            name='SupportMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=material_delivery.models.get_upload_support_path, validators=[material_delivery.models.validate_file_extension], verbose_name='File')),
                ('delivery', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='support_materials', to='material_delivery.MaterialDelivery', verbose_name='Material Delivery')),
            ],
            options={
                'verbose_name': 'Support Material',
                'verbose_name_plural': 'Support Materials',
            },
        ),
        migrations.CreateModel(
            name='TeacherEvaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('evaluation', models.PositiveSmallIntegerField(null=True, verbose_name='Grade')),
                ('commentary', models.TextField(blank=True, verbose_name='Commentary')),
                ('file', models.FileField(upload_to=material_delivery.models.get_upload_teacher_path, validators=[material_delivery.models.validate_file_extension], verbose_name='File')),
                ('is_updated', models.BooleanField(default=False, verbose_name='Is updated?')),
                ('evaluation_date', models.DateTimeField(auto_now_add=True, verbose_name='Evaluation Date')),
                ('deliver', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='student_deliver', to='material_delivery.StudentDeliver', verbose_name='Student Deliver')),
                ('teacher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='teacherevaluation_user', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'Teacher Evaluation',
                'verbose_name_plural': 'Teacher Evaluations',
            },
        ),
    ]
