# Generated by Django 3.0.7 on 2021-05-23 04:17

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Bookings',
            fields=[
                ('bid', models.AutoField(primary_key=True, serialize=False)),
                ('chargetype', models.CharField(max_length=20, null=True)),
                ('advance', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('fromdate', models.DateField()),
                ('todate', models.DateField()),
                ('message', models.CharField(max_length=400)),
                ('bookingdate', models.DateField(auto_now=True)),
                ('status', models.CharField(max_length=20)),
                ('startreading', models.IntegerField(null=True)),
                ('returnreading', models.IntegerField(null=True)),
                ('pickuplocation', models.CharField(max_length=100, null=True)),
                ('billamount', models.DecimalField(decimal_places=2, default=0.0, max_digits=12)),
            ],
            options={
                'db_table': 'bookings',
                'ordering': ['-bid'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('catname', models.CharField(max_length=30, null=True)),
                ('description', models.CharField(max_length=2000, null=True)),
                ('photo', models.ImageField(default='noimage.png', upload_to='cats')),
            ],
            options={
                'db_table': 'brands',
            },
        ),
        migrations.CreateModel(
            name='Customers',
            fields=[
                ('userid', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('uname', models.CharField(max_length=50)),
                ('pwd', models.CharField(max_length=20)),
                ('phone', models.CharField(max_length=10, null=True)),
                ('gender', models.CharField(max_length=12, null=True)),
                ('address', models.CharField(max_length=40, null=True)),
                ('role', models.CharField(max_length=20)),
                ('createdon', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'customers',
                'ordering': ['-createdon'],
            },
        ),
        migrations.CreateModel(
            name='Drivers',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('dname', models.CharField(max_length=30)),
                ('address', models.CharField(max_length=40)),
                ('gender', models.CharField(max_length=12)),
                ('licno', models.CharField(max_length=20)),
                ('phone', models.CharField(max_length=10)),
                ('adhar', models.CharField(max_length=12)),
                ('dob', models.DateField()),
                ('photo', models.ImageField(default='noimage.png', upload_to='drivers')),
                ('status', models.CharField(default='Available', max_length=20)),
                ('active', models.BooleanField(default=True)),
                ('createdon', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'drivers',
                'ordering': ['-createdon'],
            },
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('userid', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('uname', models.CharField(max_length=50)),
                ('pwd', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('pid', models.AutoField(primary_key=True, serialize=False)),
                ('pymtdate', models.DateField(auto_now=True)),
                ('paymentmethod', models.CharField(max_length=20, null=True)),
                ('cardno', models.CharField(max_length=20, null=True)),
                ('remarks', models.CharField(max_length=50, null=True)),
                ('amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=14)),
                ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.Bookings')),
            ],
            options={
                'db_table': 'payments',
            },
        ),
        migrations.CreateModel(
            name='JourneyStage',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('stage', models.CharField(max_length=30)),
                ('stagetime', models.DateTimeField(auto_now=True)),
                ('bookings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.Bookings')),
            ],
            options={
                'db_table': 'journeystages',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('ratings', models.IntegerField(null=True)),
                ('feedback', models.CharField(max_length=1000)),
                ('createdon', models.DateTimeField(auto_now=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.Customers')),
            ],
            options={
                'db_table': 'feedbacks',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='CarVariant',
            fields=[
                ('cid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=30)),
                ('dayprice', models.DecimalField(decimal_places=2, default=0.0, max_digits=12)),
                ('kmprice', models.DecimalField(decimal_places=2, default=0.0, max_digits=12)),
                ('fueltype', models.CharField(max_length=20)),
                ('capacity', models.IntegerField()),
                ('ac', models.BooleanField()),
                ('powerdoorlock', models.BooleanField()),
                ('powersteering', models.BooleanField()),
                ('airbag', models.BooleanField()),
                ('powerwindows', models.BooleanField()),
                ('cdplayer', models.BooleanField()),
                ('centrallock', models.BooleanField()),
                ('gps', models.BooleanField(default=False)),
                ('photo', models.ImageField(default='noimage.png', upload_to='pics')),
                ('createdon', models.DateTimeField(auto_now=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.Category')),
            ],
            options={
                'db_table': 'cars',
                'ordering': ['-cid'],
            },
        ),
        migrations.CreateModel(
            name='Car',
            fields=[
                ('carno', models.CharField(max_length=12, primary_key=True, serialize=False)),
                ('rcno', models.CharField(max_length=20)),
                ('modelyear', models.IntegerField()),
                ('reading', models.IntegerField()),
                ('status', models.CharField(default='Available', max_length=20)),
                ('active', models.BooleanField(default=True)),
                ('createdon', models.DateTimeField(auto_now=True)),
                ('carv', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.CarVariant')),
            ],
            options={
                'db_table': 'registeredcars',
                'ordering': ['-createdon'],
            },
        ),
        migrations.AddField(
            model_name='bookings',
            name='car',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='carapp.Car'),
        ),
        migrations.AddField(
            model_name='bookings',
            name='driver',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='carapp.Drivers'),
        ),
        migrations.AddField(
            model_name='bookings',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carapp.Users'),
        ),
    ]
