# Generated by Django 5.2.7 on 2025-10-27 09:39

import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("epdb", "0008_enzymelink"),
    ]

    operations = [
        migrations.CreateModel(
            name="JobLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="modified"
                    ),
                ),
                ("task_id", models.UUIDField(unique=True)),
                ("job_name", models.TextField()),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("INITIAL", "Initial"),
                            ("SUCCESS", "Success"),
                            ("FAILURE", "Failure"),
                            ("REVOKED", "Revoked"),
                            ("IGNORED", "Ignored"),
                        ],
                        default="INITIAL",
                        max_length=20,
                    ),
                ),
                ("done_at", models.DateTimeField(blank=True, default=None, null=True)),
                ("task_result", models.TextField(blank=True, default=None, null=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
