# Generated by Django 4.0.8 on 2023-02-02 09:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('eveuniverse', '0007_evetype_description'),
        ('eveonline', '0017_alliance_and_corp_names_are_not_unique'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='General',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'permissions': (('basic_access', 'Can access the Hunting App'), ('target_view', 'Can modify a Hunting target'), ('target_add', 'Can add a Hunting target'), ('target_edit', 'Can modify a Hunting target'), ('locator_view', "Can view LocateCharMsg's"), ('locator_addtoken', 'Can add a Token for locator agents'), ('locator_request', 'Can request a locate'), ('locator_action', 'Can perform a locate, and mark it as actioned')),
                'managed': False,
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('division', models.IntegerField(choices=[(18, 'R&D'), (22, 'Distribution'), (23, 'Mining'), (24, 'Security'), (25, 'Business'), (26, 'Exploration'), (27, 'Industry'), (28, 'Military'), (29, 'Advanced Military'), (37, '37?')], default=28, verbose_name='Division')),
                ('level', models.IntegerField(choices=[(1, 'Level 1'), (2, 'Level 2'), (3, 'Level 3'), (4, 'Level 4'), (5, 'Level 5')], verbose_name='Level 1<>5')),
                ('type', models.IntegerField(choices=[(1, 'NonAgent'), (2, 'BasicAgent'), (3, 'TutorialAgent'), (4, 'ResearchAgent'), (5, 'CONCORDAgent'), (6, 'GenericStorylineMissionAgent'), (7, 'StorylineMissionAgent'), (8, 'EventMissionAgent'), (9, 'FactionalWarfareAgent'), (10, 'EpicArcAgent'), (11, 'AuraAgent'), (12, 'CareerAgent')], verbose_name='Type')),
                ('is_locator', models.BooleanField(verbose_name='Locator Agent')),
                ('character', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='')),
                ('corporation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecorporationinfo', verbose_name='Corporation')),
                ('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evestation', verbose_name='Station')),
            ],
            options={
                'verbose_name': 'Locator Agent',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='LocateChar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('cache_expiry', models.DateTimeField(blank=True, default=None, null=True)),
                ('character', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
            ],
            options={
                'verbose_name': 'Character',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TargetGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TargetAlt',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hard_cyno', models.BooleanField(verbose_name='Hard Cyno')),
                ('beacon_cyno', models.BooleanField(verbose_name='Anchored Cyno Beacon')),
                ('scout', models.BooleanField(verbose_name='Scout')),
                ('pilot', models.BooleanField(verbose_name='Can Pilot the Target Ship')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
            ],
            options={
                'verbose_name': 'Target Alt',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Target',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alts', models.ManyToManyField(blank=True, to='hunting.targetalt', verbose_name='Alts')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
                ('last_ship_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evesolarsystem', verbose_name='Last Known Ship Location')),
                ('ship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evetype', verbose_name='Ship')),
            ],
            options={
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(verbose_name='Note Text')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author')),
                ('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hunting.target', verbose_name='Hunting Target')),
            ],
            options={
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='LocateCharMsg',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sender_id', models.IntegerField(verbose_name='Sender Agent ID')),
                ('timestamp', models.DateTimeField(verbose_name='Timestamp')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
                ('constellation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.eveconstellation', verbose_name='Constellation')),
                ('locate_character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hunting.locatechar', verbose_name='Locator Character')),
                ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.everegion', verbose_name='Region')),
                ('solar_system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evesolarsystem', verbose_name='Solar Systen')),
                ('station', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='eveuniverse.evestation', verbose_name='Station')),
            ],
            options={
                'verbose_name': 'LocateCharMsg Notification',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='LocateCharAgent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hunting.agent', verbose_name='Locator Agent')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
            ],
            options={
                'verbose_name': 'Character - Locator Agent',
            },
        ),
        migrations.AddField(
            model_name='locatechar',
            name='locate_char_agent',
            field=models.ManyToManyField(blank=True, to='hunting.locatecharagent', verbose_name='Valid Locator Agents'),
        ),
        migrations.AddIndex(
            model_name='targetalt',
            index=models.Index(fields=['character'], name='hunting_tar_charact_65373c_idx'),
        ),
        migrations.AddIndex(
            model_name='locatecharmsg',
            index=models.Index(fields=['locate_character'], name='hunting_loc_locate__173b71_idx'),
        ),
        migrations.AddIndex(
            model_name='locatecharmsg',
            index=models.Index(fields=['character'], name='hunting_loc_charact_56907c_idx'),
        ),
        migrations.AddIndex(
            model_name='locatecharmsg',
            index=models.Index(fields=['sender_id'], name='hunting_loc_sender__a11d38_idx'),
        ),
        migrations.AddConstraint(
            model_name='locatecharagent',
            constraint=models.UniqueConstraint(fields=('agent', 'character'), name='LocateCharAgent'),
        ),
        migrations.AddIndex(
            model_name='locatechar',
            index=models.Index(fields=['character'], name='hunting_loc_charact_4031fc_idx'),
        ),
    ]
