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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Flight',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_city', models.CharField(max_length=50)),
                ('to_city', models.CharField(max_length=50)),
                ('date', models.DateField()),
                ('from_time', models.DateTimeField()),
                ('to_time', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Passenger',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=100)),
                ('age', models.IntegerField()),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Plane',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('num_of_seats', models.IntegerField()),
                ('available', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('flight_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Flight')),
                ('passenger', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Passenger')),
            ],
        ),
        migrations.AddField(
            model_name='flight',
            name='plane_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Plane'),
        ),
    ]
