# Generated by Django 4.2.28 on 2026-02-25 09:16

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


class Migration(migrations.Migration):

    replaces = [
        ("skillfarm", "0001_initial"),
        ("skillfarm", "0002_skillfarmaudit_last_notification_and_more"),
        ("skillfarm", "0003_characterskill_name_and_more"),
        ("skillfarm", "0004_evetypeprice"),
        ("skillfarm", "0005_alter_characterskill_character_and_more"),
        ("skillfarm", "0006_create_update_status_existings"),
        ("skillfarm", "0007_alter_evetypeprice_name"),
        ("skillfarm", "0008_alter_characterupdatestatus_section"),
        ("skillfarm", "0009_skillfarmaudit_is_read"),
        ("skillfarm", "0010_alter_evetypeprice_options_and_more"),
    ]

    initial = True

    dependencies = [
        ("eve_sde", "0012_alter_constellation_region"),
        ("eveonline", "0017_alliance_and_corp_names_are_not_unique"),
    ]

    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, Skillfarm."),
                    ("corp_access", "Has access to all characters in the corporation."),
                    ("admin_access", "Has access to all characters."),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="SkillFarmAudit",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("active", models.BooleanField(default=True)),
                ("notification", models.BooleanField(default=False)),
                (
                    "character",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="skillfarm_character",
                        to="eveonline.evecharacter",
                    ),
                ),
                (
                    "last_notification",
                    models.DateTimeField(blank=True, default=None, null=True),
                ),
                ("notification_sent", models.BooleanField(default=False)),
                ("name", models.CharField(blank=True, max_length=255, null=True)),
                (
                    "is_read",
                    models.BooleanField(
                        default=False, help_text="Mark Character as read"
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="SkillFarmSetup",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                ("skillset", models.JSONField(blank=True, default=dict, null=True)),
                (
                    "character",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="skillfarm_setup",
                        to="skillfarm.skillfarmaudit",
                    ),
                ),
                ("name", models.CharField(blank=True, max_length=255, null=True)),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="CharacterUpdateStatus",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "section",
                    models.CharField(
                        choices=[("skills", "Skills"), ("skillqueue", "Skillqueue")],
                        db_index=True,
                        max_length=32,
                    ),
                ),
                (
                    "is_success",
                    models.BooleanField(db_index=True, default=None, null=True),
                ),
                ("error_message", models.TextField()),
                ("has_token_error", models.BooleanField(default=False)),
                (
                    "last_run_at",
                    models.DateTimeField(
                        db_index=True,
                        default=None,
                        help_text="Last run has been started at this time",
                        null=True,
                    ),
                ),
                (
                    "last_run_finished_at",
                    models.DateTimeField(
                        db_index=True,
                        default=None,
                        help_text="Last run has been successful finished at this time",
                        null=True,
                    ),
                ),
                (
                    "last_update_at",
                    models.DateTimeField(
                        db_index=True,
                        default=None,
                        help_text="Last update has been started at this time",
                        null=True,
                    ),
                ),
                (
                    "last_update_finished_at",
                    models.DateTimeField(
                        db_index=True,
                        default=None,
                        help_text="Last update has been successful finished at this time",
                        null=True,
                    ),
                ),
                (
                    "character",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="skillfarm_update_status",
                        to="skillfarm.skillfarmaudit",
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="CharacterSkill",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "active_skill_level",
                    models.PositiveIntegerField(
                        validators=[
                            django.core.validators.MinValueValidator(0),
                            django.core.validators.MaxValueValidator(5),
                        ]
                    ),
                ),
                ("skillpoints_in_skill", models.PositiveBigIntegerField()),
                (
                    "trained_skill_level",
                    models.PositiveBigIntegerField(
                        validators=[
                            django.core.validators.MinValueValidator(0),
                            django.core.validators.MaxValueValidator(5),
                        ]
                    ),
                ),
                (
                    "character",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="skillfarm_skills",
                        to="skillfarm.skillfarmaudit",
                    ),
                ),
                (
                    "eve_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
                ("name", models.CharField(blank=True, max_length=255, null=True)),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="CharacterSkillqueueEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("queue_position", models.PositiveIntegerField(db_index=True)),
                ("finish_date", models.DateTimeField(default=None, null=True)),
                (
                    "finished_level",
                    models.PositiveIntegerField(
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(5),
                        ]
                    ),
                ),
                ("level_end_sp", models.PositiveIntegerField(default=None, null=True)),
                (
                    "level_start_sp",
                    models.PositiveIntegerField(default=None, null=True),
                ),
                ("start_date", models.DateTimeField(default=None, null=True)),
                (
                    "training_start_sp",
                    models.PositiveIntegerField(default=None, null=True),
                ),
                (
                    "character",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="skillfarm_skillqueue",
                        to="skillfarm.skillfarmaudit",
                    ),
                ),
                (
                    "eve_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
                ("has_no_skillqueue", models.BooleanField(default=False)),
                ("last_check", models.DateTimeField(default=None, null=True)),
                ("name", models.CharField(blank=True, max_length=255, null=True)),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="EveTypePrice",
            fields=[
                ("name", models.CharField(default="Edit This...", max_length=255)),
                (
                    "eve_type",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        primary_key=True,
                        serialize=False,
                        to="eve_sde.itemtype",
                    ),
                ),
                ("buy", models.DecimalField(decimal_places=2, max_digits=20)),
                ("sell", models.DecimalField(decimal_places=2, max_digits=20)),
                ("updated_at", models.DateTimeField()),
            ],
            options={
                "default_permissions": (),
            },
        ),
    ]
