# Generated by Django 4.2.26 on 2025-11-19 12:51

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("taxsystem", "0013_rename_adminlogs_corporationadminhistory_and_more"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="AllianceOwnerUpdateStatus",
            new_name="AllianceUpdateStatus",
        ),
        migrations.CreateModel(
            name="AlliancePaymentHistory",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "date",
                    models.DateTimeField(
                        default=django.utils.timezone.now,
                        help_text="Date of the action",
                        verbose_name="Date",
                    ),
                ),
                (
                    "action",
                    models.CharField(
                        choices=[
                            ("", ""),
                            ("Status Changed", "Status Changed"),
                            ("Payment Added", "Payment Added"),
                            ("Reviser Comment", "Reviser Comment"),
                        ],
                        default="",
                        help_text="Action performed",
                        max_length=20,
                        verbose_name="Action",
                    ),
                ),
                (
                    "comment",
                    models.CharField(
                        choices=[
                            ("", ""),
                            ("Payment added to system", "Payment added to system"),
                            (
                                "Automated approved Payment",
                                "Automated approved Payment",
                            ),
                            (
                                "Payment must be approved by an reviser",
                                "Payment must be approved by an reviser",
                            ),
                        ],
                        default="",
                        help_text="Comment of the action",
                        max_length=255,
                        verbose_name="Comment",
                    ),
                ),
                (
                    "new_status",
                    models.CharField(
                        choices=[
                            ("approved", "Approved"),
                            ("pending", "Pending"),
                            ("rejected", "Rejected"),
                            ("needs_approval", "Requires Auditor"),
                        ],
                        help_text="New Status of the action",
                        max_length=16,
                        verbose_name="New Status",
                    ),
                ),
                (
                    "payment",
                    models.ForeignKey(
                        help_text="Payment that the action was performed on",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="taxsystem.alliancepayments",
                        verbose_name="Payment",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        help_text="User that performed the action",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="User",
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="AllianceAdminHistory",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "date",
                    models.DateTimeField(
                        default=django.utils.timezone.now,
                        help_text="Date of the action",
                        verbose_name="Date",
                    ),
                ),
                (
                    "action",
                    models.CharField(
                        choices=[
                            ("", ""),
                            ("Added", "Added"),
                            ("Changed", "Changed"),
                            ("Deleted", "Deleted"),
                        ],
                        default="",
                        help_text="Action performed",
                        max_length=20,
                        verbose_name="Action",
                    ),
                ),
                (
                    "comment",
                    models.TextField(blank=True, default="", verbose_name="Comment"),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        help_text="Payment that the action was performed on",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="taxsystem.allianceowner",
                        verbose_name="Payment",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        help_text="User that performed the action",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="User",
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
    ]
