# Generated by Django 3.2.7 on 2021-09-15 03:28

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


class Migration(migrations.Migration):

    dependencies = [
        ('ezbook_project', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('booking_date', models.DateField()),
                ('seat_number', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='BookTravel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('available_travel_date', models.DateField()),
                ('available_travel_time', models.TimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(default='', max_length=100)),
                ('password', models.CharField(default='', max_length=100)),
                ('name_company', models.CharField(default='', max_length=100)),
                ('date_created', models.DateField()),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(default='', max_length=100)),
                ('company_pic', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('driver_pic', models.CharField(default='', max_length=100)),
                ('driver_fullname', models.CharField(default='', max_length=100)),
                ('company_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.company')),
            ],
        ),
        migrations.CreateModel(
            name='Travel_Places',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('places', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_pic', models.CharField(default='', max_length=100)),
                ('username', models.CharField(default='', max_length=100)),
                ('password', models.CharField(default='', max_length=100)),
                ('firstname', models.CharField(default='', max_length=100)),
                ('middlename', models.CharField(default='', max_length=100)),
                ('lastname', models.CharField(default='', max_length=100)),
                ('age', models.IntegerField()),
                ('phone_number', models.CharField(default='', max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('date_created', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vehicle_plate', models.CharField(default='', max_length=100)),
                ('vehicle_capacity', models.IntegerField()),
                ('vehicle_type', models.CharField(default='', max_length=100)),
                ('vehicle_pic', models.CharField(default='', max_length=100)),
                ('company_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.company')),
                ('vehicle_driver_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.driver')),
            ],
        ),
        migrations.RemoveField(
            model_name='student',
            name='person_ptr',
        ),
        migrations.DeleteModel(
            name='Person',
        ),
        migrations.DeleteModel(
            name='Student',
        ),
        migrations.AddField(
            model_name='booktravel',
            name='company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.company'),
        ),
        migrations.AddField(
            model_name='booktravel',
            name='place_from',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='places_from', to='ezbook_project.travel_places'),
        ),
        migrations.AddField(
            model_name='booktravel',
            name='place_to',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='places_to', to='ezbook_project.travel_places'),
        ),
        migrations.AddField(
            model_name='booktravel',
            name='vehicle_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.vehicle'),
        ),
        migrations.AddField(
            model_name='booking',
            name='book_travel_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.booktravel'),
        ),
        migrations.AddField(
            model_name='booking',
            name='user_travel_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ezbook_project.user'),
        ),
    ]
