# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2019-04-25 20:16
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address_line1', models.CharField(max_length=512)),
                ('address_line2', models.CharField(max_length=512)),
                ('state', models.CharField(max_length=512)),
                ('district', models.CharField(max_length=512)),
                ('taluka', models.CharField(max_length=512)),
                ('village', models.CharField(max_length=512, null=True)),
                ('pincode', models.CharField(max_length=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('brand_name', models.CharField(max_length=255, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('total_item_price', models.FloatField()),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.FloatField()),
                ('quantity', models.IntegerField(default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('category_name', models.CharField(max_length=255, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Farmer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Hotel',
            fields=[
                ('hotel_name', models.CharField(max_length=512)),
                ('gstn_no', models.CharField(max_length=20, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Login',
            fields=[
                ('login_token', models.CharField(default=b'90517633-3f48-493e-91cd-841b3135c88c', max_length=70, primary_key=True, serialize=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('loggedout_time', models.DateTimeField(null=True)),
                ('is_logged_in', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(max_length=255)),
                ('default_image', models.CharField(max_length=512, null=True)),
                ('features', models.CharField(max_length=512, null=True)),
                ('price', models.FloatField(max_length=10)),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Brand')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Category')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseOrders',
            fields=[
                ('purchase_order_token', models.CharField(default=b'5da38d10-f671-4b7d-a90a-c7fae701e64f', max_length=70, primary_key=True, serialize=False)),
                ('total_price', models.FloatField(max_length=10)),
                ('is_shipped', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Cart')),
                ('hotel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Hotel')),
                ('shipping_address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Address')),
            ],
        ),
        migrations.CreateModel(
            name='SellOrders',
            fields=[
                ('sell_order_token', models.CharField(default=b'5b80c981-e4a5-42e1-ba97-1209c0662251', max_length=70, primary_key=True, serialize=False)),
                ('quantity', models.IntegerField(default=1)),
                ('total_price', models.FloatField()),
                ('product_image', models.CharField(max_length=512)),
                ('order_status', models.CharField(default=b'In Stock', max_length=10)),
                ('is_shipped', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('farmer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Farmer')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Product')),
                ('shipping_address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Address')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('username', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=1024)),
                ('created_on', models.DateTimeField(auto_now=True)),
                ('fullname', models.CharField(max_length=512)),
                ('mobile', models.CharField(max_length=12)),
                ('pan_no', models.CharField(max_length=12)),
                ('account_no', models.CharField(max_length=15)),
                ('photo', models.CharField(max_length=1024, null=True)),
                ('shipping_addresses', models.ManyToManyField(to='supplychainmodels.Address')),
            ],
        ),
        migrations.AddField(
            model_name='login',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.User'),
        ),
        migrations.AddField(
            model_name='hotel',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.User'),
        ),
        migrations.AddField(
            model_name='farmer',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.User'),
        ),
        migrations.AddField(
            model_name='cartitem',
            name='sell_order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.SellOrders'),
        ),
        migrations.AddField(
            model_name='cart',
            name='cart_items',
            field=models.ManyToManyField(to='supplychainmodels.CartItem'),
        ),
        migrations.AddField(
            model_name='cart',
            name='hotel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplychainmodels.Hotel'),
        ),
    ]
