# Generated by Django 5.2.12 on 2026-07-05 05:12

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("eveonline", "0025_remove_evecharacter_last_updated_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="General",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "permissions": (
                    ("basic_access", "Can access this app"),
                    ("add_owner", "Can link a character's Access Lists for tracking"),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="Acl",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "esi_id",
                    models.BigIntegerField(
                        help_text="The Access List's ID from ESI.", unique=True
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="The Access List's name.", max_length=255
                    ),
                ),
                ("description", models.TextField(blank=True)),
                (
                    "allow_everyone",
                    models.BooleanField(
                        default=False,
                        help_text="Whether everyone is allowed on this ACL unless blocked.",
                    ),
                ),
                (
                    "is_active",
                    models.BooleanField(
                        default=True,
                        help_text="Whether this ACL should be kept in sync.",
                    ),
                ),
                ("last_synced_at", models.DateTimeField(blank=True, null=True)),
            ],
            options={
                "ordering": ["name"],
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="Owner",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "is_active",
                    models.BooleanField(
                        default=True,
                        help_text="Disabled owners are skipped by the sync task.",
                    ),
                ),
                ("last_synced_at", models.DateTimeField(blank=True, null=True)),
                (
                    "character",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="acl_checker_owner",
                        to="eveonline.evecharacter",
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="AclAllianceEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("alliance_id", models.PositiveIntegerField()),
                (
                    "access",
                    models.CharField(
                        choices=[
                            ("Unspecified", "Unspecified"),
                            ("Allowed", "Allowed"),
                            ("Blocked", "Blocked"),
                            ("Manager", "Manager"),
                            ("Admin", "Admin"),
                        ],
                        max_length=20,
                    ),
                ),
                (
                    "acl",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="alliance_entries",
                        to="acl_checker.acl",
                    ),
                ),
            ],
            options={
                "ordering": ["alliance_id"],
                "default_permissions": (),
                "unique_together": {("acl", "alliance_id")},
            },
        ),
        migrations.CreateModel(
            name="AclCharacterEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("character_id", models.PositiveIntegerField()),
                (
                    "access",
                    models.CharField(
                        choices=[
                            ("Unspecified", "Unspecified"),
                            ("Allowed", "Allowed"),
                            ("Blocked", "Blocked"),
                            ("Manager", "Manager"),
                            ("Admin", "Admin"),
                        ],
                        max_length=20,
                    ),
                ),
                (
                    "acl",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="character_entries",
                        to="acl_checker.acl",
                    ),
                ),
            ],
            options={
                "ordering": ["character_id"],
                "default_permissions": (),
                "unique_together": {("acl", "character_id")},
            },
        ),
        migrations.CreateModel(
            name="AclCorporationEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("corporation_id", models.PositiveIntegerField()),
                (
                    "access",
                    models.CharField(
                        choices=[
                            ("Unspecified", "Unspecified"),
                            ("Allowed", "Allowed"),
                            ("Blocked", "Blocked"),
                            ("Manager", "Manager"),
                            ("Admin", "Admin"),
                        ],
                        max_length=20,
                    ),
                ),
                (
                    "acl",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="corporation_entries",
                        to="acl_checker.acl",
                    ),
                ),
            ],
            options={
                "ordering": ["corporation_id"],
                "default_permissions": (),
                "unique_together": {("acl", "corporation_id")},
            },
        ),
    ]
