# Generated by Django 6.0.1 on 2026-02-01 19:07

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


class Migration(migrations.Migration):

    dependencies = [
        ('insider', '0003_alter_insidersetting_value'),
    ]

    operations = [
        migrations.CreateModel(
            name='InsiderIntegration',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(help_text="Internal ID (e.g., 'slack')", max_length=50, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('is_active', models.BooleanField(default=False)),
                ('order', models.PositiveIntegerField(default=0, help_text='Lower numbers run first (Waterfall)')),
                ('description', models.TextField(blank=True)),
                ('logo_url', models.URLField(blank=True, null=True)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='InsiderIntegrationKey',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(help_text='The variable name used in code', max_length=100)),
                ('value', models.TextField(blank=True, null=True)),
                ('label', models.CharField(help_text='Human readable label for the UI', max_length=200)),
                ('field_type', models.CharField(choices=[('STRING', 'Text Input'), ('PASSWORD', 'Secret Input'), ('BOOLEAN', 'Toggle'), ('INTEGER', 'Number')], default='STRING', max_length=20)),
                ('is_required', models.BooleanField(default=True)),
                ('help_text', models.TextField(blank=True, null=True)),
                ('integration', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='config_keys', to='insider.insiderintegration')),
            ],
            options={
                'unique_together': {('integration', 'key')},
            },
        ),
    ]
