# Generated by Django 5.2.8 on 2025-12-13 01:31

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


class Migration(migrations.Migration):

    dependencies = [
        ('billing', '0012_add_feature_dynamic_fields'),
        ('core', '0027_remove_legacy_feature_fields'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='TenantCustomTier',
            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)),
                ('grace_period_started_at', models.DateTimeField(blank=True, null=True)),
                ('features', models.JSONField(default=dict)),
                ('notes', models.TextField(blank=True, help_text='Admin notes about why this custom tier exists')),
                ('business', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='custom_tier', to='core.tenant')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_custom_tiers', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Tenant Custom Tier',
                'verbose_name_plural': 'Tenant Custom Tiers',
                'ordering': ['-updated_at'],
            },
        ),
    ]
