# Generated by Django 2.0.7 on 2018-07-28 16:31

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BookCab',
            fields=[
                ('booking_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('booking_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('cust_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('cust_name', models.CharField(max_length=100)),
                ('mobile_no', models.CharField(max_length=10, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('driver_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('driver_name', models.CharField(max_length=100)),
                ('mobile_no', models.CharField(max_length=10, unique=True)),
                ('car_no', models.CharField(max_length=10, unique=True)),
                ('availablity', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='TravelHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('booking_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.BookCab')),
                ('cust_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Customer')),
                ('cust_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Customer')),
                ('driver_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Driver')),
                ('driver_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Driver')),
            ],
        ),
        migrations.AddField(
            model_name='bookcab',
            name='cust_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Customer'),
        ),
        migrations.AddField(
            model_name='bookcab',
            name='cust_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Customer'),
        ),
        migrations.AddField(
            model_name='bookcab',
            name='driver_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Driver'),
        ),
        migrations.AddField(
            model_name='bookcab',
            name='driver_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='uberapi.Driver'),
        ),
    ]
