# Generated by Django 2.2.1 on 2019-06-08 02:52

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.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80)),
                ('priority', models.SmallIntegerField(choices=[(1, 'Low Priority'), (2, 'Medium Priorityy'), (3, 'High Priority')], default=1)),
                ('state', models.SmallIntegerField(choices=[(1, 'New'), (2, 'Accepted'), (3, 'Completed'), (4, 'Declined'), (5, 'Canceled')], default=1)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('completed_on', models.DateTimeField(auto_now_add=True, null=True)),
                ('completed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='completed_by', to=settings.AUTH_USER_MODEL)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='created_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TaskTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action', models.SmallIntegerField(choices=[(1, 'New'), (2, 'Accepted'), (3, 'Completed'), (4, 'Declined'), (5, 'Canceled')], default=1)),
                ('performed_on', models.DateTimeField(auto_now=True)),
                ('performed_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task_app.Task')),
            ],
        ),
    ]
