# Generated by Django 2.0.1 on 2018-04-23 04:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PlaneEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=250)),
                ('description', models.TextField(default='')),
                ('location', models.CharField(default='', max_length=500)),
                ('location_to', models.CharField(default='', max_length=500)),
                ('flight_number', models.CharField(default='', max_length=50)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PlaneTicket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField(default=0)),
                ('is_reserved', models.BooleanField(default=False)),
                ('is_purchased', models.BooleanField(default=False)),
                ('reserve_deadline', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to=settings.AUTH_USER_MODEL)),
                ('plane_event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plane.PlaneEvent')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('seat_no', models.IntegerField(default=0)),
                ('is_empty', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='SeatingPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('row_no', models.IntegerField(default=0)),
                ('col_no', models.IntegerField(default=0)),
                ('plane_event', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='plane.PlaneEvent')),
            ],
        ),
        migrations.AddField(
            model_name='seat',
            name='seating_plan',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plane.SeatingPlan'),
        ),
    ]
