# Generated by Django 4.2.19 on 2025-03-29 08:40

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


class Migration(migrations.Migration):

    replaces = [('incursions', '0001_initial'), ('incursions', '0002_remove_incursion_influence_and_more'), ('incursions', '0003_focus'), ('incursions', '0004_alter_focus_incursion'), ('incursions', '0005_incursioninfluence_uniqueincursioninfluencelogtimestamp'), ('incursions', '0006_alter_incursion_infested_solar_systems_and_more'), ('incursions', '0007_alter_focus_options'), ('incursions', '0008_general_remove_incursionsconfig_security_high_and_more'), ('incursions', '0009_alter_incursion_state_alter_waitlist_close_and_more')]

    initial = True

    dependencies = [
        ('eveonline', '0017_alliance_and_corp_names_are_not_unique'),
        ('eveuniverse', '0007_evetype_description'),
        ('eveuniverse', '0010_alter_eveindustryactivityduration_eve_type_and_more'),
        ('authentication', '0023_alter_userprofile_language'),
    ]

    operations = [
        migrations.CreateModel(
            name='Webhook',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(max_length=200)),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Destination Webhook',
                'verbose_name_plural': 'Destination Webhooks',
            },
        ),
        migrations.CreateModel(
            name='IncursionsConfig',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('security_high', models.BooleanField(verbose_name='Notify on High Security Incursions')),
                ('security_low', models.BooleanField(verbose_name='Notify on Low Security Incursions')),
                ('security_null', models.BooleanField(verbose_name='Notify on Null Security Incursions')),
                ('status_webhooks', models.ManyToManyField(to='incursions.webhook', verbose_name='Destination Webhook for Incursion Updates')),
            ],
            options={
                'verbose_name': 'AA Incursions Settings',
                'verbose_name_plural': 'AA Incursions Settings',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Incursion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('has_boss', models.BooleanField(default=False, verbose_name='Whether the final encounter has boss or not')),
                ('state', models.CharField(choices=[('established', 'Incursion established'), ('mobilizing', 'Incursion mobilized'), ('withdrawing', 'Incursion withdrawing'), ('ended', 'Ended')], default='established', max_length=50, verbose_name='The state of this incursion')),
                ('type', models.CharField(choices=[('Incursion', 'Sansha Incursion')], default='Incursion', max_length=50, verbose_name='The type of this incursion')),
                ('established_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='Established')),
                ('mobilizing_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='Mobilizing')),
                ('withdrawing_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='Withdrawing')),
                ('ended_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='Ended')),
                ('constellation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.eveconstellation', verbose_name='The constellation id in which this incursion takes place')),
                ('faction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evefactioninfo', verbose_name='The attacking faction’s id')),
                ('infested_solar_systems', models.ManyToManyField(related_name='+', to='eveuniverse.evesolarsystem', verbose_name='A list of infested solar system ids that are a part of this incursion')),
                ('staging_solar_system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveuniverse.evesolarsystem', verbose_name='Staging solar system for this incursion')),
            ],
            options={
                'verbose_name': 'Incursion',
                'verbose_name_plural': 'Incursions',
            },
        ),
        migrations.CreateModel(
            name='IncursionInfluence',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(verbose_name='Timestamp')),
                ('influence', models.FloatField(default=0.0, verbose_name='Influence of this incursion as a float from 0 to 1')),
                ('incursion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incursions.incursion', verbose_name='Incursion')),
            ],
            options={
                'verbose_name': 'IncursionInfluence',
                'verbose_name_plural': 'IncursionInfluences',
            },
        ),
        migrations.CreateModel(
            name='Focus',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('incursion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='incursions.incursion', verbose_name='Current Focus')),
            ],
            options={
                'verbose_name': 'Focus',
                'verbose_name_plural': 'Focus',
                'default_permissions': (),
            },
        ),
        migrations.AddConstraint(
            model_name='incursioninfluence',
            constraint=models.UniqueConstraint(fields=('incursion', 'timestamp'), name='UniqueIncursionInfluenceLogTimestamp'),
        ),
        migrations.AlterField(
            model_name='incursion',
            name='infested_solar_systems',
            field=models.ManyToManyField(related_name='+', to='eveuniverse.evesolarsystem', verbose_name='A list of infested solar system ids that are a part of this incursion'),
        ),
        migrations.AlterField(
            model_name='incursionsconfig',
            name='status_webhooks',
            field=models.ManyToManyField(to='incursions.webhook', verbose_name='Destination Webhook for Incursion Updates'),
        ),
        migrations.AlterModelOptions(
            name='focus',
            options={'default_permissions': (), 'verbose_name': 'Current Focus', 'verbose_name_plural': 'Current Focus'},
        ),
        migrations.CreateModel(
            name='General',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'permissions': (('basic_incursions', 'Can view incursion data'),),
                'managed': False,
                'default_permissions': (),
            },
        ),
        migrations.RemoveField(
            model_name='incursionsconfig',
            name='security_high',
        ),
        migrations.RemoveField(
            model_name='incursionsconfig',
            name='security_low',
        ),
        migrations.RemoveField(
            model_name='incursionsconfig',
            name='security_null',
        ),
        migrations.AddField(
            model_name='webhook',
            name='security_high',
            field=models.BooleanField(default=True, verbose_name='Notify on High Security Incursions'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='webhook',
            name='security_low',
            field=models.BooleanField(default=True, verbose_name='Notify on Low Security Incursions'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='webhook',
            name='security_null',
            field=models.BooleanField(default=True, verbose_name='Notify on Null Security Incursions'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='incursion',
            name='faction',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evefactioninfo', verbose_name='The attacking Faction'),
        ),
        migrations.CreateModel(
            name='WaitlistShip',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('weight', models.IntegerField(verbose_name='Weight')),
                ('ship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evetype', verbose_name='Ship Hull')),
            ],
            options={
                'verbose_name': 'Waitlist Ship Weight',
                'verbose_name_plural': 'Waitlist Ship Weightings',
            },
        ),
        migrations.CreateModel(
            name='WaitlistEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True, verbose_name='Waitlist Join Time')),
                ('note', models.TextField(verbose_name='Any extended note, Box #, begging to let ishtar-trash into fleet')),
                ('role', models.CharField(choices=[('dps', 'Mainline DPS'), ('vindicator', 'Vindicator'), ('logistics', 'Logistics'), ('boosts', 'Fleet Boosts / Other Utility')], default='dps', max_length=50, verbose_name='Ship role, usually applied to split the waitlist.')),
                ('ship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incursions.waitlistship', verbose_name='Ship Hull, with applied Weight')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='authentication.user', verbose_name='User')),
            ],
            options={
                'verbose_name': 'Waitlist Entry',
                'verbose_name_plural': 'Waitlist Entries',
            },
        ),
        migrations.AlterField(
            model_name='incursion',
            name='state',
            field=models.CharField(choices=[('established', 'Incursion established'), ('mobilizing', 'Incursion mobilizing'), ('withdrawing', 'Incursion withdrawing'), ('ended', 'Ended')], default='established', max_length=50, verbose_name='The state of this incursion'),
        ),
        migrations.CreateModel(
            name='Waitlist',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('open', models.DateTimeField(verbose_name='Open Time')),
                ('close', models.DateTimeField(verbose_name='Close Time')),
                ('fc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='authentication.user', verbose_name='Fleet Commander')),
            ],
            options={
                'verbose_name': 'Waitlist',
                'verbose_name_plural': 'Waitlist',
            },
        ),
    ]
