# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-10-02 06:11
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('celestria', '0003_add_related_name_to_fks'),
    ]

    operations = [
        migrations.CreateModel(
            name='SpaceCraft',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('unit_number', models.CharField(max_length=250)),
                ('manufacture_date', models.DateTimeField()),
                ('passenger_capacity', models.PositiveIntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SpaceCraftManufacturer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('description', models.TextField(blank=True, null=True)),
                ('headquarters_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='spacecraft_manufacturers', to='celestria.AuthorizingBody')),
            ],
        ),
        migrations.CreateModel(
            name='SpaceCraftModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('description', models.TextField(blank=True, null=True)),
                ('passenger_capacity', models.PositiveIntegerField()),
                ('first_introduced', models.DateTimeField()),
                ('retired_on', models.DateTimeField(blank=True, null=True)),
                ('unit_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=32, null=True)),
                ('propulsion_type', models.IntegerField(choices=[(0, 'Gas Rocket'), (1, 'Ion Thruster'), (2, 'Solar Sail'), (3, 'Nuclear Pulse'), (4, 'Fusion'), (5, 'Antimatter'), (6, 'Others')], default=1)),
                ('manufacturer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='space_craft_models', to='celestria.SpaceCraftManufacturer')),
            ],
        ),
        migrations.AddField(
            model_name='spacecraft',
            name='model',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='space_crafts', to='celestria.SpaceCraftModel'),
        ),
        migrations.AddField(
            model_name='spacecraft',
            name='registering_body',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='space_crafts', to='celestria.AuthorizingBody'),
        ),
    ]
