# Generated by Django 2.2.6 on 2019-10-31 02:43

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='Audit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_correct', models.NullBooleanField(choices=[(None, ''), (True, 'Yes'), (False, 'No')], default=None, max_length=3)),
                ('review', models.TextField(default='Review')),
                ('creation_time', models.DateTimeField(auto_now_add=True)),
                ('start_time', models.DateTimeField(blank=True, null=True)),
                ('finish_time', models.DateTimeField(blank=True, null=True)),
                ('auditor_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ResearchTasks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_type', models.CharField(blank=True, max_length=10, null=True)),
                ('task_summary', models.CharField(default='Enter a single line summary', max_length=500)),
                ('task_desc', models.TextField(default='Describe the task')),
                ('creation_time', models.DateTimeField(auto_now_add=True)),
                ('num_workers', models.PositiveIntegerField(default=1)),
                ('audit_by', models.IntegerField(choices=[(1, 'Task'), (2, 'Worker')], default=2)),
                ('audit_prob', models.DecimalField(decimal_places=2, default=0.5, max_digits=3)),
                ('salary_by', models.IntegerField(choices=[(1, 'Task'), (2, 'Worker')], default=2)),
                ('salary_task', models.DecimalField(decimal_places=2, default=0.02, max_digits=4)),
                ('bonus_task', models.DecimalField(decimal_places=2, default=0.01, max_digits=4)),
                ('fine_task', models.DecimalField(decimal_places=2, default=0.01, max_digits=4)),
                ('creator_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TaskUserJunction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('claim_time', models.DateTimeField(auto_now_add=True)),
                ('answer', models.CharField(max_length=500, null=True)),
                ('submission_time', models.DateTimeField(blank=True, null=True)),
                ('comment', models.CharField(blank=True, max_length=500, null=True)),
                ('confidence_level', models.IntegerField(blank=True, choices=[(1, 'poor'), (2, 'below average'), (3, 'average'), (4, 'above average'), (5, 'good')], null=True)),
                ('task_audit', models.BooleanField(default=False)),
                ('audit_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='tasks.Audit')),
                ('task_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tasks.ResearchTasks')),
                ('worker_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='audit',
            name='task_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tasks.ResearchTasks'),
        ),
    ]
