# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-18 18:11
from __future__ import unicode_literals

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Facility',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('ident', models.CharField(max_length=5, unique=True)),
                ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('responsibility', django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326)),
            ],
            options={
                'verbose_name_plural': 'facilities',
            },
        ),
        migrations.CreateModel(
            name='Flight',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ident', models.CharField(max_length=20, unique=True)),
                ('flight_path', django.contrib.gis.db.models.fields.LineStringField(srid=4326)),
                ('departure_time', models.DateTimeField()),
                ('arrival_time', models.DateTimeField()),
                ('status', models.CharField(choices=[('filed', 'filed'), ('active', 'active'), ('closed', 'closed')], default='filed', max_length=20)),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('heading', models.IntegerField(blank=True, null=True)),
                ('track', django.contrib.gis.db.models.fields.LineStringField(blank=True, null=True, srid=4326)),
                ('remaining_path', django.contrib.gis.db.models.fields.LineStringField(blank=True, null=True, srid=4326)),
                ('current_step', models.IntegerField(default=0)),
                ('total_seconds', models.IntegerField(default=120)),
                ('report_seconds', models.IntegerField(default=10)),
                ('arrival_facility', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arrivals', to='app.Facility')),
                ('departure_facility', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='departures', to='app.Facility')),
                ('facility', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='current_flights', to='app.Facility')),
            ],
        ),
        migrations.CreateModel(
            name='MapSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('channel', models.CharField(max_length=200, unique=True)),
                ('zoom', models.IntegerField(blank=True, null=True)),
                ('bounds', django.contrib.gis.db.models.fields.PolygonField(blank=True, null=True, srid=4326)),
            ],
        ),
        migrations.CreateModel(
            name='Weather',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('geom', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
            ],
            options={
                'verbose_name_plural': 'weather',
            },
        ),
    ]
