# Generated by Django 5.2 on 2025-05-29 00:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0018_add_secrets_support'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PaidPlanIntent',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('plan_name', models.CharField(choices=[('startup', 'Startup'), ('enterprise', 'Enterprise')], max_length=32)),
                ('requested_at', models.DateTimeField(auto_now_add=True)),
                ('extra', models.JSONField(blank=True, help_text='Optional metadata (utm params, referrer, etc)', null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='plan_intents', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-requested_at'],
                'constraints': [models.UniqueConstraint(fields=('user', 'plan_name'), name='unique_user_plan_intent')],
            },
        ),
    ]
