# Generated by Django 5.2.10 on 2026-01-15 13:27

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("authentik_endpoints", "0004_deviceaccessgroup_attributes"),
        ("authentik_events", "0014_notification_hyperlink_notification_hyperlink_label_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="FleetConnector",
            fields=[
                (
                    "connector_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="authentik_endpoints.connector",
                    ),
                ),
                ("url", models.URLField()),
                ("token", models.TextField()),
                ("map_users", models.BooleanField(default=True)),
                ("map_teams_access_group", models.BooleanField(default=False)),
                (
                    "headers_mapping",
                    models.ForeignKey(
                        default=None,
                        help_text="Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs",
                        null=True,
                        on_delete=django.db.models.deletion.SET_DEFAULT,
                        related_name="+",
                        to="authentik_events.notificationwebhookmapping",
                    ),
                ),
            ],
            options={
                "verbose_name": "Fleet Connector",
                "verbose_name_plural": "Fleet Connectors",
            },
            bases=("authentik_endpoints.connector",),
        ),
    ]
