# Generated by Django 5.2.15 on 2026-06-25 06:33

# 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"),
        ("industry_reforged", "0010_planetpin_notification_sent"),
    ]

    operations = [
        migrations.AddField(
            model_name="corpitemconfig",
            name="last_low_stock_warning",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="corpwalletdivision",
            name="last_warning",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.CreateModel(
            name="CorporationWebhookConfig",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "orders_webhook",
                    models.URLField(
                        blank=True,
                        help_text="Webhook URL for new Orders and Quotes.",
                        null=True,
                    ),
                ),
                (
                    "jobs_webhook",
                    models.URLField(
                        blank=True,
                        help_text="Webhook URL for Corporate Industry Jobs completion.",
                        null=True,
                    ),
                ),
                (
                    "wallets_webhook",
                    models.URLField(
                        blank=True,
                        help_text="Webhook URL for low wallet balance warnings.",
                        null=True,
                    ),
                ),
                (
                    "wallet_warning_threshold",
                    models.BigIntegerField(
                        default=500000000,
                        help_text="Balance below which a warning is sent (default: 500 million ISK).",
                    ),
                ),
                (
                    "inventory_webhook",
                    models.URLField(
                        blank=True,
                        help_text="Webhook URL for low inventory warnings.",
                        null=True,
                    ),
                ),
                (
                    "corporation",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="industry_webhooks",
                        to="eveonline.evecorporationinfo",
                    ),
                ),
            ],
            options={
                "verbose_name": "Discord Webhook Configuration",
                "verbose_name_plural": "Discord Webhook Configurations",
            },
        ),
    ]
