# Generated by Django 3.2.4 on 2021-06-15 18:49

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='Schedule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('flight_number', models.CharField(db_index=True, max_length=100, unique=True)),
                ('airline_company', models.CharField(max_length=100)),
                ('date_of_departure', models.DateTimeField()),
                ('arrival_date', models.DateTimeField()),
                ('type', models.CharField(max_length=100)),
                ('gate', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(verbose_name='')),
                ('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Дата добавления')),
                ('flight', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travell.schedule', verbose_name='Авиарейс')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Коментарий',
                'verbose_name_plural': 'Коментарии',
            },
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(max_length=100)),
                ('surname', models.TextField(max_length=100)),
                ('place', models.CharField(max_length=100)),
                ('moderation', models.BooleanField(default=False, verbose_name='Модерация')),
                ('plane', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travell.schedule', verbose_name='Авиарейс')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
            ],
        ),
    ]
