# Generated migration to remove legacy feature fields from Tenant model
# These are being consolidated into the billing entitlement system

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ("core", "0026_add_service_selection_heading_fields"),
    ]

    operations = [
        # Remove legacy subscription fields
        migrations.RemoveField(
            model_name="tenant",
            name="subscription_tier",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="subscription_plan",
        ),
        # Remove legacy integer limit fields
        migrations.RemoveField(
            model_name="tenant",
            name="max_users",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="max_resources",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="max_pages",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="max_event_types",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="max_calendars_connected",
        ),
        # Remove legacy boolean feature fields - Platform permissions
        migrations.RemoveField(
            model_name="tenant",
            name="can_manage_oauth_credentials",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_accept_payments",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_custom_domain",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_white_label",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_api_access",
        ),
        # Remove legacy boolean feature fields - Capabilities
        migrations.RemoveField(
            model_name="tenant",
            name="can_add_video_conferencing",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_connect_to_api",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_book_repeated_events",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_require_2fa",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_download_logs",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_delete_data",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_sms_reminders",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_masked_phone_numbers",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_pos",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_mobile_app",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_export_data",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_plugins",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_tasks",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_create_plugins",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_webhooks",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_calendar_sync",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_use_contracts",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="can_customize_booking_page",
        ),
        # Remove legacy TierLimit model (replaced by billing.PlanFeature)
        migrations.DeleteModel(
            name="TierLimit",
        ),
    ]
