# Generated by Django 3.2.18 on 2023-11-28 11:49

import pipeline.contrib.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="PluginExecuteTask",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("state", models.CharField(max_length=64, verbose_name="状态名")),
                ("invoke_count", models.IntegerField(default=1, verbose_name="invoke count")),
                ("component_code", models.CharField(db_index=True, max_length=255, verbose_name="组件编码")),
                ("version", models.CharField(default="legacy", max_length=255, verbose_name="插件版本")),
                ("inputs", pipeline.contrib.fields.SerializerField(default={}, verbose_name="node inputs")),
                ("outputs", pipeline.contrib.fields.SerializerField(default={}, verbose_name="node outputs")),
                ("callback_data", pipeline.contrib.fields.SerializerField(default={}, verbose_name="callback data")),
                (
                    "contexts",
                    pipeline.contrib.fields.SerializerField(default={}, verbose_name="pipeline context values"),
                ),
                ("runtime_attrs", pipeline.contrib.fields.SerializerField(default={}, verbose_name="runtime attr")),
                ("scheduling", models.BooleanField(db_index=True, default=False, verbose_name="是否正在调度")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="create time")),
                ("finish_at", models.DateTimeField(null=True, verbose_name="finish time")),
            ],
        ),
        migrations.AddIndex(
            model_name="pluginexecutetask",
            index=models.Index(fields=["id", "scheduling"], name="plugin_exec_id_e7c7b2_idx"),
        ),
    ]
