# Generated by Django 2.2.6 on 2019-11-07 17:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('tag', models.CharField(max_length=100)),
                ('status', models.CharField(choices=[('UPL', 'File uploaded'), ('RDY', 'Ready for evaluation'), ('ICP', 'Information incomplete'), ('CCL', 'Cancelled'), ('TIQ', 'Task waiting in queue'), ('WIP', 'Evaluation in progress'), ('FIN', 'Evaluation finished'), ('ERR', 'Error occurred'), ('UNA', 'Unavailable')], max_length=20)),
                ('description', models.TextField()),
                ('type', models.CharField(choices=[('RL', 'Repository Link Upload'), ('FU', 'File Upload')], max_length=20)),
                ('repo', models.URLField()),
                ('attachment', models.FileField(upload_to=refni_io.models.Submission.update_filename)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='EvalReport',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('title', models.CharField(default='Report', max_length=200)),
                ('content', models.TextField()),
                ('eval_start_time', models.DateTimeField()),
                ('eval_end_time', models.DateTimeField()),
                ('submission', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='refni_io.Submission')),
            ],
        ),
        migrations.CreateModel(
            name='Configuration',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('content', models.TextField()),
                ('submission', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='refni_io.Submission')),
            ],
        ),
    ]
