# Generated by Django 2.2.6 on 2020-04-12 00:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('delivery', '0001_initial'),
        ('customer', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('address_id', models.AutoField(primary_key=True, serialize=False)),
                ('street1', models.CharField(max_length=50)),
                ('street2', models.CharField(max_length=50)),
                ('area', models.CharField(max_length=25)),
                ('city', models.CharField(max_length=25)),
                ('landmark', models.CharField(max_length=25)),
                ('type', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('item_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('units', models.IntegerField()),
                ('price', models.IntegerField()),
                ('catagory', models.CharField(default=' ', max_length=50)),
                ('subcategory', models.CharField(default='', max_length=50)),
                ('available_qty', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='OrderList',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.IntegerField()),
                ('unit', models.IntegerField()),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle_Info',
            fields=[
                ('vehicle_id', models.AutoField(primary_key=True, serialize=False)),
                ('vehicle_number', models.CharField(max_length=15)),
                ('type', models.CharField(max_length=20)),
                ('lat_long', models.CharField(max_length=30)),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='delivery.DeliveryBoy')),
            ],
        ),
        migrations.CreateModel(
            name='UserOrder',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('status', models.CharField(max_length=30)),
                ('delivery_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Address')),
                ('order_list', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.OrderList')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Users')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('delivery_time', models.DateField(auto_now_add=True)),
                ('status', models.CharField(default='pending', max_length=30)),
                ('quantity', models.IntegerField()),
                ('customer_status', models.CharField(default='pending', max_length=30)),
                ('delivery_boy_status', models.CharField(default='pending', max_length=30)),
                ('admin_status', models.CharField(default='pending', max_length=30)),
                ('address_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Address')),
                ('customer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Users')),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Item')),
            ],
        ),
        migrations.CreateModel(
            name='BufferStock',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('delivery_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Address')),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Item')),
            ],
        ),
        migrations.CreateModel(
            name='AllotedArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('area_code', models.CharField(max_length=30)),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='delivery.DeliveryBoy')),
                ('vehicle_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Admin.Vehicle_Info')),
            ],
        ),
    ]
