# Generated by Django 3.0.2 on 2020-02-01 17:10

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_auto_20200126_1559'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActionModel',
            fields=[
                ('action_id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='ConditionModel',
            fields=[
                ('condition_id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
                ('at_least', models.IntegerField()),
                ('at_most', models.IntegerField()),
                ('target', models.IntegerField(choices=[(0, 'SELF'), (1, 'ENEMY')])),
            ],
        ),
        migrations.CreateModel(
            name='ShipModel',
            fields=[
                ('ship_id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
                ('health', models.IntegerField()),
                ('max_energy', models.IntegerField()),
            ],
        ),
        migrations.RemoveField(
            model_name='radarmodel',
            name='tracking_styel',
        ),
        migrations.AddField(
            model_name='radarmodel',
            name='tracking_style',
            field=models.IntegerField(choices=[(0, 'PASSIVE'), (1, 'ACTIVE')], default=0),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='ammunitionmodel',
            name='ammunition_type',
            field=models.IntegerField(choices=[(0, 'CRYSTAL'), (1, 'MISSILE'), (2, 'RAIL'), (3, 'ELECTRIC')]),
        ),
        migrations.AlterField(
            model_name='ammunitionmodel',
            name='damage_type',
            field=models.IntegerField(choices=[(0, 'ENERGY'), (1, 'EXPLOSIVE'), (2, 'IMPACT'), (3, 'EWAR')]),
        ),
        migrations.AlterField(
            model_name='armourmodel',
            name='armour_type',
            field=models.IntegerField(choices=[(0, 'REFLECTIVE'), (1, 'REACTIVE'), (2, 'ABLATIVE'), (3, 'CHARGED')]),
        ),
        migrations.AlterField(
            model_name='weaponmodel',
            name='ammunition_type',
            field=models.IntegerField(choices=[(0, 'CRYSTAL'), (1, 'MISSILE'), (2, 'RAIL'), (3, 'ELECTRIC')]),
        ),
        migrations.CreateModel(
            name='SubroutineModel',
            fields=[
                ('subroutine_id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
                ('priority', models.IntegerField()),
                ('ship_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.ShipModel')),
            ],
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='ammunitions',
            field=models.ManyToManyField(to='api.AmmunitionModel'),
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='computer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.ComputerModel'),
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='impulse_engine',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.ImpulseEngineModel'),
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='jump_drive',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.JumpDriveModel'),
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='radar',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.RadarModel'),
        ),
        migrations.AddField(
            model_name='shipmodel',
            name='weapons',
            field=models.ManyToManyField(to='api.WeaponModel'),
        ),
    ]
