# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-08 15:54
from __future__ import unicode_literals

import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('short_response', models.CharField(blank=True, max_length=128)),
                ('comment', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': 'review',
                'verbose_name_plural': 'reviews',
            },
        ),
        migrations.CreateModel(
            name='Submit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('filename', models.CharField(blank=True, max_length=128)),
                ('is_accepted', models.IntegerField(choices=[(0, b'no'), (1, b'with penalization'), (2, b'yes')], default=2)),
            ],
            options={
                'verbose_name': 'submit',
                'verbose_name_plural': 'submits',
            },
        ),
        migrations.CreateModel(
            name='SubmitReceiver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('configuration', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'submit receiver',
                'verbose_name_plural': 'submit receivers',
            },
        ),
        migrations.CreateModel(
            name='SubmitReceiverTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('configuration', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('name', models.CharField(max_length=64)),
            ],
            options={
                'verbose_name': 'submit receiver template',
                'verbose_name_plural': 'submit receiver templates',
            },
        ),
        migrations.AddField(
            model_name='submit',
            name='receiver',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='submit.SubmitReceiver'),
        ),
        migrations.AddField(
            model_name='submit',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='review',
            name='submit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='submit.Submit'),
        ),
    ]
