# Generated by Django 3.0 on 2020-06-07 16:12

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='Tasks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=200)),
                ('added_at', models.DateTimeField(auto_now_add=True)),
                ('description', models.TextField(help_text='Enter task summary', max_length=1000)),
                ('stage', models.CharField(choices=[('n', 'Not Started'), ('i', 'In Progress'), ('r', 'In Review'), ('d', 'Done')], default=('n', 'Not Started'), help_text='Stage of the task', max_length=1)),
                ('assigned_to', models.ManyToManyField(help_text='Select employees to assign the task', to=settings.AUTH_USER_MODEL)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Creator', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Updater', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('is_lead', 'lead can add task'), ('is_emp', 'employee can change progress of task')),
            },
        ),
        migrations.CreateModel(
            name='Audit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_id', models.IntegerField()),
                ('stage', models.CharField(choices=[('n', 'Not Started'), ('i', 'In Progress'), ('r', 'In Review'), ('d', 'Done')], default=('n', 'Not Started'), help_text='Stage of the task', max_length=1)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('task_obj', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task.Tasks')),
                ('updater', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('is_lead', 'lead can add task'), ('is_emp', 'employee can change progress of task')),
            },
        ),
    ]

# Generated by Django 3.0 on 2020-06-07 16:12

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='Tasks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=200)),
                ('added_at', models.DateTimeField(auto_now_add=True)),
                ('description', models.TextField(help_text='Enter task summary', max_length=1000)),
                ('stage', models.CharField(choices=[('n', 'Not Started'), ('i', 'In Progress'), ('r', 'In Review'), ('d', 'Done')], default=('n', 'Not Started'), help_text='Stage of the task', max_length=1)),
                ('assigned_to', models.ManyToManyField(help_text='Select employees to assign the task', to=settings.AUTH_USER_MODEL)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Creator', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Updater', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('is_lead', 'lead can add task'), ('is_emp', 'employee can change progress of task')),
            },
        ),
        migrations.CreateModel(
            name='Audit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_id', models.IntegerField()),
                ('stage', models.CharField(choices=[('n', 'Not Started'), ('i', 'In Progress'), ('r', 'In Review'), ('d', 'Done')], default=('n', 'Not Started'), help_text='Stage of the task', max_length=1)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('task_obj', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task.Tasks')),
                ('updater', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('is_lead', 'lead can add task'), ('is_emp', 'employee can change progress of task')),
            },
        ),
    ]

# Generated by Django 3.0 on 2020-06-07 16:12