# Generated by Django 4.2.15 on 2024-11-03 23:40

import django.core.validators
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("eveuniverse", "0010_alter_eveindustryactivityduration_eve_type_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="General",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "permissions": (
                    ("create_pinger", "Can create a pinger in a discord channel"),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="Singleton",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "last_check",
                    models.DateTimeField(
                        default=django.utils.timezone.now,
                        help_text="Stores the last time we had new API data to work with",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="SignatureSystem",
            fields=[
                (
                    "id",
                    models.IntegerField(
                        help_text="Eve scout signature id",
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "origin",
                    models.CharField(
                        choices=[("TH", "Thera"), ("TU", "Turnur")],
                        help_text="Where the signature originates from",
                        max_length=2,
                    ),
                ),
                (
                    "size",
                    models.CharField(
                        choices=[
                            ("C", "Capital"),
                            ("XL", "Extra-Large"),
                            ("L", "Large"),
                            ("M", "Medium"),
                            ("S", "Small"),
                        ],
                        help_text="Size of the wormhole",
                        max_length=2,
                        null=True,
                    ),
                ),
                (
                    "system",
                    models.ForeignKey(
                        help_text="System in which the signature appeared",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="eveuniverse.evesolarsystem",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="SignaturePinger",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "discord_channel_id",
                    models.BigIntegerField(help_text="Discord channel id to ping"),
                ),
                (
                    "ping_for_thera",
                    models.BooleanField(
                        default=True,
                        help_text="If there should be a ping for Thera connections",
                    ),
                ),
                (
                    "ping_for_turnur",
                    models.BooleanField(
                        default=True,
                        help_text="If there should be a ping for Turnur connections",
                    ),
                ),
                (
                    "ping_type",
                    models.CharField(
                        choices=[
                            ("", "None"),
                            ("@here", "@here"),
                            ("@everyone", "@everyone"),
                        ],
                        default="",
                        help_text="Type of notification that should be sent out with the ping",
                        max_length=9,
                    ),
                ),
                (
                    "always_ping",
                    models.BooleanField(
                        default=False,
                        help_text="Will bypass the minimum distances and always ping when a new signature is detected.System selection still applies",
                    ),
                ),
                (
                    "min_ping_distance_ly",
                    models.FloatField(
                        default=0,
                        help_text="Ping if the signature spawns less than this amount of light years",
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
                (
                    "min_ping_distance_jump",
                    models.IntegerField(
                        default=0,
                        help_text="ping if the signature spawns less than this amount of jumps",
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
                (
                    "system",
                    models.ForeignKey(
                        help_text="System to be watched",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="eveuniverse.evesolarsystem",
                    ),
                ),
            ],
        ),
    ]
