# Generated by Django 2.1.1 on 2020-07-22 03:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0003_auto_20200721_0502'),
        ('secctions', '0012_auto_20200721_1528'),
    ]

    operations = [
        migrations.CreateModel(
            name='Homework',
            fields=[
                ('code_homework', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('response_file', models.FileField(blank=True, null=True, upload_to=secctions.models.get_upload_response_path)),
            ],
        ),
        migrations.CreateModel(
            name='Responses',
            fields=[
                ('code_response', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message_response', models.CharField(max_length=1000)),
                ('date_response', models.DateTimeField(auto_now_add=True)),
                ('secction_response', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='response', to='secctions.Secction')),
                ('student_response', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='responses', to='users.StudentUser')),
            ],
        ),
        migrations.AlterField(
            model_name='responsesecction',
            name='response',
            field=models.FileField(blank=True, null=True, upload_to=secctions.models.get_upload_response_path),
        ),
        migrations.AlterField(
            model_name='responsesecction',
            name='studentResponse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='response', to='users.StudentUser'),
        ),
        migrations.AddField(
            model_name='homework',
            name='response_secction',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='response', to='secctions.Responses'),
        ),
    ]
