# Generated by Django 2.2.10 on 2020-09-18 11:07

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("workflow_handler", "0025_merge_20200901_1025"),
    ]

    operations = [
        migrations.CreateModel(
            name="TaskActivity",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "action",
                    models.CharField(
                        choices=[
                            ("created", "created"),
                            ("assigned", "assigned"),
                            ("completed", "completed"),
                            ("saved", "saved"),
                            ("comment", "comment"),
                        ],
                        max_length=128,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        choices=[
                            ("api", "api"),
                            ("zapier", "zapier"),
                            ("csv", "csv"),
                            ("manual", "manual"),
                        ],
                        max_length=64,
                    ),
                ),
                ("filename", models.CharField(max_length=128, null=True)),
                ("comment", models.TextField(null=True)),
                (
                    "assignee",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="assignee",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "created_by",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="creator",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "task",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="workflow_handler.Task",
                    ),
                ),
            ],
        ),
    ]
