# Generated by Django 4.0.10 on 2023-06-19 05:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('eveonline', '0017_alliance_and_corp_names_are_not_unique'),
        ('eveuniverse', '0007_evetype_description'),
    ]

    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')),
                ('influence', models.FloatField(default=0.0, verbose_name='Influence of this incursion as a float from 0 to 1')),
                ('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='')),
                ('mobilizing_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='')),
                ('withdrawing_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='')),
                ('ended_timestamp', models.DateTimeField(blank=True, null=True, verbose_name='')),
                ('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',
            },
        ),
    ]
