# Generated by Django 5.2.15 on 2026-06-17 19:40

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


class Migration(migrations.Migration):

    dependencies = [
        ("eveonline", "0025_remove_evecharacter_last_updated_and_more"),
        ("eveuniverse", "0012_alter_evebloodline_eve_ship_type"),
        (
            "industry_reforged",
            "0005_corppricingconfig_memberorder_orderfit_orderitem_and_more",
        ),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="general",
            options={
                "default_permissions": (),
                "managed": False,
                "permissions": (
                    ("basic_access", "Can access this app"),
                    ("corp_access", "Can access corporate industry jobs"),
                    (
                        "industrialist_access",
                        "Can access the industrialist dashboard and claim jobs",
                    ),
                ),
            },
        ),
        migrations.CreateModel(
            name="CorpMOTD",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "message",
                    models.TextField(help_text="Message of the day for industrialists"),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "corporation",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="motd",
                        to="eveonline.evecorporationinfo",
                    ),
                ),
                (
                    "updated_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="eveonline.evecharacter",
                    ),
                ),
            ],
            options={
                "verbose_name": "Corp MOTD",
                "verbose_name_plural": "Corp MOTDs",
            },
        ),
        migrations.CreateModel(
            name="ProductionTask",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("quantity", models.IntegerField(default=1)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("UNCLAIMED", "Unclaimed"),
                            ("IN_PRODUCTION", "In Production"),
                            ("COMPLETED", "Completed"),
                        ],
                        default="UNCLAIMED",
                        max_length=20,
                    ),
                ),
                (
                    "gamification_value",
                    models.DecimalField(
                        decimal_places=2,
                        default=0.0,
                        help_text="Calculated ISK value of the task for leaderboards",
                        max_digits=17,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("assigned_at", models.DateTimeField(blank=True, null=True)),
                ("completed_at", models.DateTimeField(blank=True, null=True)),
                (
                    "assigned_to",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="claimed_tasks",
                        to="eveonline.evecharacter",
                    ),
                ),
                (
                    "created_from_order",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="production_tasks",
                        to="industry_reforged.memberorder",
                    ),
                ),
                (
                    "item_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eveuniverse.evetype",
                    ),
                ),
            ],
            options={
                "verbose_name": "Production Task",
                "verbose_name_plural": "Production Tasks",
            },
        ),
    ]
