# Generated by Django 3.2.4 on 2021-07-04 20:39

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='Task',
            fields=[
                ('id', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)),
                ('title', models.CharField(max_length=128)),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.TextField()),
                ('lang', models.CharField(max_length=20)),
                ('status', models.CharField(max_length=20)),
                ('score', models.PositiveIntegerField(default=0)),
                ('timeUsed', models.PositiveIntegerField(default=0)),
                ('memoryUsed', models.PositiveIntegerField(default=0)),
                ('owner', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('task', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='core.task')),
            ],
        ),
        migrations.CreateModel(
            name='GroupResult',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.PositiveIntegerField(default=0)),
                ('fullScore', models.PositiveIntegerField(default=0)),
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.submission')),
            ],
        ),
        migrations.CreateModel(
            name='CaseResult',
            fields=[
                ('id', models.PositiveIntegerField(primary_key=True, serialize=False, unique=True)),
                ('verdict', models.CharField(max_length=128)),
                ('message', models.CharField(max_length=128)),
                ('timeUsed', models.PositiveIntegerField(default=0)),
                ('memoryUsed', models.PositiveIntegerField(default=0)),
                ('score', models.PositiveIntegerField(default=0)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.groupresult')),
            ],
        ),
    ]
