# Generated by Django 2.1.7 on 2019-03-04 16:10

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('challenge', '0004_auto_20190304_0605'),
    ]

    operations = [
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('sub_text', models.CharField(max_length=200, verbose_name='submission text')),
                ('sub_score', models.DecimalField(decimal_places=6, default=0.0, help_text='submission score', max_digits=10)),
                ('sub_status', models.CharField(blank=True, choices=[('u', 'uploaded'), ('c', 'calculated'), ('e', 'error format'), ('t', 'time error')], default='u', help_text='status of submission', max_length=1)),
                ('contest', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='contest_submission', to='challenge.Contest')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_submission', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='submission',
            unique_together={('user', 'contest')},
        ),
    ]
