# Generated by Django 5.2.8 on 2025-12-13 00:17

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


class Migration(migrations.Migration):

    dependencies = [
        ('billing', '0011_add_tenant_feature_codes'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='feature',
            options={'ordering': ['category', 'display_order', 'name']},
        ),
        migrations.AddField(
            model_name='feature',
            name='category',
            field=models.CharField(choices=[('limits', 'Limits'), ('payments', 'Payments & Revenue'), ('communication', 'Communication'), ('customization', 'Customization'), ('plugins', 'Plugins & Automation'), ('advanced', 'Advanced Features'), ('scheduling', 'Scheduling'), ('enterprise', 'Enterprise & Security')], default='advanced', help_text='UI grouping category', max_length=50),
        ),
        migrations.AddField(
            model_name='feature',
            name='depends_on',
            field=models.ForeignKey(blank=True, help_text='Parent feature this depends on (e.g., tasks depends on plugins)', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dependents', to='billing.feature'),
        ),
        migrations.AddField(
            model_name='feature',
            name='display_order',
            field=models.PositiveIntegerField(default=100, help_text='Order within category (lower = first)'),
        ),
        migrations.AddField(
            model_name='feature',
            name='is_overridable',
            field=models.BooleanField(default=True, help_text='Can this feature be overridden at tenant level?'),
        ),
        migrations.AddField(
            model_name='feature',
            name='tenant_field_name',
            field=models.CharField(blank=True, help_text="Corresponding field on Tenant model (e.g., 'can_use_sms_reminders')", max_length=100),
        ),
    ]
