# Generated by Django 2.1.4 on 2019-02-02 18:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('subject', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField()),
                ('totalscore', models.IntegerField(default=0)),
                ('isdeleted', models.BooleanField(default=False)),
                ('question', models.TextField(blank=True, null=True)),
                ('constraint', models.TextField(blank=True, null=True)),
                ('inputformat', models.TextField(blank=True, null=True)),
                ('outputformat', models.TextField(blank=True, null=True)),
                ('sampleinput', models.TextField(blank=True, null=True)),
                ('sampleoutput', models.TextField(blank=True, null=True)),
                ('explanation', models.TextField(blank=True, null=True)),
                ('total_inputfiles', models.IntegerField(null=True)),
                ('deadline', models.DateField()),
                ('subject', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assignment_subject', to='subject.Subject')),
            ],
        ),
        migrations.CreateModel(
            name='Assignment_files',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
                ('score', models.IntegerField(blank=True, null=True)),
                ('errortype', models.CharField(max_length=1000, null=True)),
                ('runtime', models.CharField(max_length=20, null=True)),
                ('memoryused', models.CharField(max_length=50, null=True)),
                ('filepath', models.TextField()),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignmentfiles_assignment', to='assignment.Assignment')),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('totalscore', models.IntegerField(default=0)),
                ('datetime', models.DateTimeField(blank=True, null=True)),
                ('verdict', models.CharField(max_length=50, null=True)),
                ('isrunning', models.CharField(max_length=20)),
                ('comment', models.TextField(blank=True, null=True)),
                ('commentunread', models.BooleanField(blank=True, default=True, null=True)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submission_assignment', to='assignment.Assignment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submission_user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Submission_files',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=20)),
                ('score', models.IntegerField(default=0)),
                ('errortype', models.CharField(max_length=1000, null=True)),
                ('runtime', models.CharField(max_length=20, null=True)),
                ('memoryused', models.CharField(max_length=50, null=True)),
                ('filepath', models.TextField()),
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissionfiles_submission', to='assignment.Submission')),
            ],
        ),
        migrations.CreateModel(
            name='Week',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('isdeleted', models.BooleanField(default=False)),
                ('is_locked', models.BooleanField(default=False)),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='week_subject', to='subject.Subject')),
            ],
        ),
        migrations.AddField(
            model_name='assignment',
            name='week',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_week', to='assignment.Week'),
        ),
    ]
