# Generated by Django 5.0.9 on 2024-11-20 15:16

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


class Migration(migrations.Migration):

    dependencies = [
        ("authentik_core", "0040_provider_invalidation_flow"),
        ("authentik_policies", "0011_policybinding_failure_result_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="ApplicationEntitlement",
            fields=[
                (
                    "policybindingmodel_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="authentik_policies.policybindingmodel",
                    ),
                ),
                ("attributes", models.JSONField(blank=True, default=dict)),
                ("name", models.TextField()),
                (
                    "app",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="authentik_core.application"
                    ),
                ),
            ],
            options={
                "verbose_name": "Application Entitlement",
                "verbose_name_plural": "Application Entitlements",
                "unique_together": {("app", "name")},
            },
            bases=("authentik_policies.policybindingmodel", models.Model),
        ),
    ]
