# Generated by Django 5.2 on 2025-09-23 12:36

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0139_merge_20250919_1946'),
    ]

    operations = [
        migrations.CreateModel(
            name='StripeConfig',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('release_env', models.CharField(help_text='Environment this configuration applies to (e.g., prod, staging, local).', max_length=32, unique=True)),
                ('live_mode', models.BooleanField(default=False, help_text='Whether this configuration should run Stripe in live mode.')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Stripe Configuration',
                'verbose_name_plural': 'Stripe Configuration',
                'ordering': ['release_env'],
            },
        ),
        migrations.CreateModel(
            name='StripeConfigEntry',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('is_secret', models.BooleanField(default=False)),
                ('value_text', models.TextField(blank=True, default='')),
                ('value_encrypted', models.BinaryField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='entries', to='api.stripeconfig')),
            ],
            options={
                'indexes': [models.Index(fields=['config', 'name'], name='api_stripec_config__9617e8_idx')],
                'unique_together': {('config', 'name')},
            },
        ),
    ]
