# Generated by Django 4.2.17 on 2025-01-30 04:19

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("eveonline", "0017_alliance_and_corp_names_are_not_unique"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    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 and see timers"),
                    ("manage_requests", "Can manage alt corp requests."),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="AltCorpRequest",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("request_date", models.DateTimeField(auto_now_add=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("PENDING", "Pending"),
                            ("APPROVED", "Approved"),
                            ("EFFECTIVE", "Effective"),
                            ("REVOKED", "Revoked"),
                        ],
                        default="PENDING",
                        max_length=20,
                    ),
                ),
                (
                    "status_date",
                    models.DateTimeField(
                        blank=True,
                        help_text="Date when the request was actioned (approved/revoked).",
                        null=True,
                    ),
                ),
                (
                    "revoke_flag",
                    models.BooleanField(
                        default=False,
                        help_text="Flagged for removal due to token issues.",
                    ),
                ),
                (
                    "revoke_deadline",
                    models.DateTimeField(
                        blank=True,
                        help_text="Deadline to resolve token issues.",
                        null=True,
                    ),
                ),
                (
                    "corporation",
                    models.ForeignKey(
                        blank=True,
                        help_text="The corporation associated with this request.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="alt_corp_requests",
                        to="eveonline.evecorporationinfo",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
