# Generated by Django 4.0.10 on 2023-10-30 22:12

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


class Migration(migrations.Migration):
    dependencies = [
        ("authentication", "0021_alter_userprofile_language"),
        ("eveonline", "0017_alliance_and_corp_names_are_not_unique"),
        ("freight", "0002_alter_contracthandler_last_error"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="contract",
            options={"verbose_name": "contract", "verbose_name_plural": "contracts"},
        ),
        migrations.AlterModelOptions(
            name="contractcustomernotification",
            options={
                "verbose_name": "contract customer notification",
                "verbose_name_plural": "contract customer notifications",
            },
        ),
        migrations.AlterModelOptions(
            name="contracthandler",
            options={
                "verbose_name": "contract handler",
                "verbose_name_plural": "contract handler",
            },
        ),
        migrations.AlterModelOptions(
            name="location",
            options={"verbose_name": "location", "verbose_name_plural": "locations"},
        ),
        migrations.AlterModelOptions(
            name="pricing",
            options={"verbose_name": "pricing", "verbose_name_plural": "pricings"},
        ),
        migrations.AlterField(
            model_name="contract",
            name="acceptor",
            field=models.ForeignKey(
                blank=True,
                default=None,
                help_text="Character of acceptor or None if accepted by corp",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_acceptor",
                to="eveonline.evecharacter",
                verbose_name="acceptor",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="acceptor_corporation",
            field=models.ForeignKey(
                blank=True,
                default=None,
                help_text="Corporation of acceptor",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_acceptor_corporation",
                to="eveonline.evecorporationinfo",
                verbose_name="acceptor corporation",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="collateral",
            field=models.FloatField(verbose_name="collateral"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="contract_id",
            field=models.IntegerField(verbose_name="contract ID"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="date_accepted",
            field=models.DateTimeField(
                blank=True, default=None, null=True, verbose_name="date accepted"
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="date_completed",
            field=models.DateTimeField(
                blank=True, default=None, null=True, verbose_name="date completed"
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="date_expired",
            field=models.DateTimeField(verbose_name="date expired"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="date_issued",
            field=models.DateTimeField(verbose_name="date issues"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="date_notified",
            field=models.DateTimeField(
                blank=True,
                db_index=True,
                default=None,
                help_text="Datetime of latest notification, None = none has been sent",
                null=True,
                verbose_name="date notified",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="days_to_complete",
            field=models.IntegerField(verbose_name="days to complete"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="end_location",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_end_location",
                to="freight.location",
                verbose_name="end location",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="for_corporation",
            field=models.BooleanField(verbose_name="for corporation"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="issuer",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_issuer",
                to="eveonline.evecharacter",
                verbose_name="issuer",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="issuer_corporation",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_issuer_corporation",
                to="eveonline.evecorporationinfo",
                verbose_name="issuer corporation",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="issues",
            field=models.TextField(
                blank=True,
                default=None,
                help_text="List or price check issues as JSON array of strings or None",
                null=True,
                verbose_name="issues",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="pricing",
            field=models.ForeignKey(
                blank=True,
                default=None,
                null=True,
                on_delete=django.db.models.deletion.SET_DEFAULT,
                related_name="contracts",
                to="freight.pricing",
                verbose_name="pricing",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="reward",
            field=models.FloatField(verbose_name="reward"),
        ),
        migrations.AlterField(
            model_name="contract",
            name="start_location",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="contracts_start_location",
                to="freight.location",
                verbose_name="start location",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="status",
            field=models.CharField(
                choices=[
                    ("outstanding", "outstanding"),
                    ("in_progress", "in progress"),
                    ("finished_issuer", "finished issuer"),
                    ("finished_contractor", "finished contractor"),
                    ("finished", "finished"),
                    ("canceled", "canceled"),
                    ("rejected", "rejected"),
                    ("failed", "failed"),
                    ("deleted", "deleted"),
                    ("reversed", "reversed"),
                ],
                db_index=True,
                max_length=32,
                verbose_name="status",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="title",
            field=models.CharField(
                blank=True,
                default=None,
                max_length=100,
                null=True,
                verbose_name="title",
            ),
        ),
        migrations.AlterField(
            model_name="contract",
            name="volume",
            field=models.FloatField(verbose_name="volume"),
        ),
        migrations.AlterField(
            model_name="contractcustomernotification",
            name="contract",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="customer_notifications",
                to="freight.contract",
                verbose_name="contract",
            ),
        ),
        migrations.AlterField(
            model_name="contractcustomernotification",
            name="date_notified",
            field=models.DateTimeField(
                help_text="datetime of notification", verbose_name="date notified"
            ),
        ),
        migrations.AlterField(
            model_name="contractcustomernotification",
            name="status",
            field=models.CharField(
                choices=[
                    ("outstanding", "outstanding"),
                    ("in_progress", "in progress"),
                    ("finished_issuer", "finished issuer"),
                    ("finished_contractor", "finished contractor"),
                    ("finished", "finished"),
                    ("canceled", "canceled"),
                    ("rejected", "rejected"),
                    ("failed", "failed"),
                    ("deleted", "deleted"),
                    ("reversed", "reversed"),
                ],
                db_index=True,
                max_length=32,
                verbose_name="status",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="character",
            field=models.ForeignKey(
                default=None,
                help_text="Character used for syncing contracts",
                null=True,
                on_delete=django.db.models.deletion.SET_DEFAULT,
                related_name="+",
                to="authentication.characterownership",
                verbose_name="character",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="last_sync",
            field=models.DateTimeField(
                blank=True,
                default=None,
                help_text="when the last sync happened",
                null=True,
                verbose_name="last sync at",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="operation_mode",
            field=models.CharField(
                default="my_alliance",
                help_text="Defines what kind of contracts are synced",
                max_length=32,
                verbose_name="operation mode",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="organization",
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                primary_key=True,
                serialize=False,
                to="freight.eveentity",
                verbose_name="organization",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="price_per_volume_modifier",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Global modifier for price per volume in percent, e.g. 2.5 = +2.5%",
                null=True,
                verbose_name="price per volume modifier",
            ),
        ),
        migrations.AlterField(
            model_name="contracthandler",
            name="version_hash",
            field=models.CharField(
                blank=True,
                default=None,
                help_text="hash to identify changes to contracts",
                max_length=32,
                null=True,
                verbose_name="version hash",
            ),
        ),
        migrations.AlterField(
            model_name="eveentity",
            name="category",
            field=models.CharField(
                choices=[
                    ("alliance", "Alliance"),
                    ("corporation", "Corporation"),
                    ("character", "Character"),
                ],
                max_length=32,
                verbose_name="category",
            ),
        ),
        migrations.AlterField(
            model_name="eveentity",
            name="id",
            field=models.IntegerField(
                primary_key=True,
                serialize=False,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="id",
            ),
        ),
        migrations.AlterField(
            model_name="eveentity",
            name="name",
            field=models.CharField(max_length=254, verbose_name="name"),
        ),
        migrations.AlterField(
            model_name="location",
            name="id",
            field=models.BigIntegerField(
                help_text="Eve Online location ID, either item ID for stations or structure ID for structures",
                primary_key=True,
                serialize=False,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="id",
            ),
        ),
        migrations.AlterField(
            model_name="location",
            name="name",
            field=models.CharField(
                db_index=True,
                help_text="In-game name of this station or structure",
                max_length=100,
                verbose_name="name",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="collateral_max",
            field=models.BigIntegerField(
                blank=True,
                default=None,
                help_text="Maximum allowed collateral in ISK",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="collateral maximum",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="collateral_min",
            field=models.BigIntegerField(
                blank=True,
                default=None,
                help_text="Minimum required collateral in ISK",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="collateral minimum",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="days_to_complete",
            field=models.PositiveIntegerField(
                blank=True,
                default=None,
                help_text="Recommended days for contract completion",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="days to complete",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="days_to_expire",
            field=models.PositiveIntegerField(
                blank=True,
                default=None,
                help_text="Recommended days for contracts to expire",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="days to expire",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="details",
            field=models.TextField(
                blank=True,
                default=None,
                help_text="Text with additional instructions for using this pricing",
                null=True,
                verbose_name="details",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="end_location",
            field=models.ForeignKey(
                help_text="Destination station or structure for courier route",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="freight.location",
                verbose_name="end location",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="is_active",
            field=models.BooleanField(
                default=True,
                help_text="Disabled pricings will not be used or shown",
                verbose_name="is active",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="is_bidirectional",
            field=models.BooleanField(
                default=True,
                help_text="Whether this pricing is valid for contracts in either direction or only the one specified",
                verbose_name="is bidirectional",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="is_default",
            field=models.BooleanField(
                default=False,
                help_text="The default pricing will be preselected in the calculator. Please make sure to only mark one pricing as default.",
                verbose_name="is default",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="price_base",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Base price in ISK",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="price base",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="price_min",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Minimum total price in ISK",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="price minimum",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="price_per_collateral_percent",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Add-on price in percent of collateral",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="price markup from collateral",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="price_per_volume",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Add-on price per m3 volume in ISK",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="price markup from volume",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="start_location",
            field=models.ForeignKey(
                help_text="Starting station or structure for courier route",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="freight.location",
                verbose_name="start location",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="use_price_per_volume_modifier",
            field=models.BooleanField(
                default=False,
                help_text="Whether the global price per volume modifier is used",
                verbose_name="price per volume modifier enabled",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="volume_max",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Maximum allowed volume in m3",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="volume maximum",
            ),
        ),
        migrations.AlterField(
            model_name="pricing",
            name="volume_min",
            field=models.FloatField(
                blank=True,
                default=None,
                help_text="Minimum allowed volume in m3",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name="volume minimum",
            ),
        ),
    ]
