# Generated by Django 6.0.3 on 2026-03-17 20:40

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


class Migration(migrations.Migration):

    dependencies = [
        ('i3tasks', '0004_alter_taskexecutionresult_task_execution_try'),
    ]

    operations = [
        migrations.AddField(
            model_name='taskexecution',
            name='chain',
            field=models.JSONField(blank=True, null=True),
        ),
        migrations.CreateModel(
            name='TaskGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('callback_task_name', models.CharField(max_length=256)),
                ('callback_task_path', models.CharField(max_length=256)),
                ('callback_task_args', models.JSONField(default=list)),
                ('callback_task_kwargs', models.JSONField(default=dict)),
                ('callback_chain', models.JSONField(blank=True, null=True)),
                ('total_count', models.IntegerField()),
                ('completed_count', models.IntegerField(default=0)),
                ('failed_count', models.IntegerField(default=0)),
                ('status', models.CharField(default='pending', max_length=16)),
            ],
            options={
                'indexes': [models.Index(fields=['status'], name='i3tasks_tas_status_bf5f17_idx')],
            },
        ),
        migrations.AddField(
            model_name='taskexecution',
            name='task_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='members', to='i3tasks.taskgroup'),
        ),
    ]
