# Generated by Django 4.2.20 on 2025-09-30 13:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('unicom', '0012_message_response_to_tool_call_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='CallbackExecution',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('callback_id', models.CharField(db_index=True, help_text="Telegram's unique callback query ID", max_length=100, unique=True)),
                ('callback_data', models.CharField(help_text='Button callback data', max_length=500)),
                ('processed_at', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('authorized_user', models.ForeignKey(help_text='Only this user can trigger this callback', on_delete=django.db.models.deletion.CASCADE, to='unicom.account')),
                ('callback_message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='callback_executions', to='unicom.message')),
                ('original_message', models.ForeignKey(help_text='The message containing the buttons', on_delete=django.db.models.deletion.CASCADE, related_name='button_callbacks', to='unicom.message')),
            ],
            options={
                'verbose_name': 'Callback Execution',
                'verbose_name_plural': 'Callback Executions',
                'db_table': 'unicom_callback_execution',
            },
        ),
    ]
