# Generated by Django 3.1 on 2020-10-27 15:44

import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    dependencies = [
        ('myapp', '0005_auto_20201027_1846'),
    ]

    operations = [
        migrations.CreateModel(
            name='category',
            fields=[
                ('category_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('name', models.CharField(max_length=200)),
            ],
            options={
                'verbose_name': 'Product Category',
            },
        ),
        migrations.CreateModel(
            name='product',
            fields=[
                ('product_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('category_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.category')),
            ],
            options={
                'verbose_name': 'Product',
            },
        ),
        migrations.CreateModel(
            name='seller',
            fields=[
                ('seller_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('category', models.IntegerField(choices=[(1, 'First Time Seller'), (2, 'Regular Seller')])),
            ],
            options={
                'verbose_name': 'Seller Category',
            },
        ),
        migrations.CreateModel(
            name='seller_address',
            fields=[
                ('seller_address_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('full_name', models.CharField(max_length=200)),
                ('address1', models.TextField(max_length=1000)),
                ('address2', models.TextField(max_length=1000)),
                ('pincode', models.CharField(max_length=20)),
                ('city', models.CharField(max_length=200)),
                ('phone', models.CharField(max_length=50, unique=True)),
                ('alt_address1', models.TextField(blank=True)),
                ('alt_address2', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': 'Seller addres',
            },
        ),
        migrations.CreateModel(
            name='seller_type',
            fields=[
                ('seller_type_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('seller_type', models.IntegerField(choices=[(1, 'Farmer'), (2, 'Vegetable Seller'), (3, 'Regional Retailer')])),
            ],
            options={
                'verbose_name': 'Seller Type',
            },
        ),
        migrations.CreateModel(
            name='tag',
            fields=[
                ('tag_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('tag', models.IntegerField(choices=[(1, 'Vegetables'), (2, 'Fruits'), (3, 'Pulses'), (4, 'Grains'), (5, 'Mushroom'), (6, 'Others'), (6, 'Fish'), (7, 'Dairy Products'), (8, 'Cotton'), (9, 'Sugarcane'), (10, 'Jute'), (11, 'Spices'), (12, 'Poultry'), (13, 'Tea'), (14, 'Coffee'), (15, 'Keshar'), (16, 'Flower'), (17, 'Seeds'), (18, 'Nuts'), (19, 'Honey'), (20, 'Rubber'), (21, 'Forest Products')])),
            ],
            options={
                'verbose_name': 'Product Tags',
            },
        ),
        migrations.AlterField(
            model_name='discount',
            name='created_date',
            field=models.DateTimeField(default=datetime.datetime(2020, 10, 27, 15, 44, 55, 228818, tzinfo=utc)),
        ),
        migrations.AlterField(
            model_name='orders',
            name='modified_date',
            field=models.DateTimeField(default=datetime.datetime(2020, 10, 27, 15, 44, 55, 236814, tzinfo=utc)),
        ),
        migrations.CreateModel(
            name='user_cart',
            fields=[
                ('cart_item_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('quantity', models.IntegerField()),
                ('save_for_later', models.BooleanField()),
                ('time_added', models.DateTimeField(default=datetime.datetime(2020, 10, 27, 15, 44, 55, 244808, tzinfo=utc))),
                ('order_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.orders')),
                ('prodcut_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.product')),
            ],
            options={
                'verbose_name': 'User Cart',
            },
        ),
        migrations.CreateModel(
            name='seller_payment_detail',
            fields=[
                ('seller_payment_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('full_name', models.CharField(max_length=200)),
                ('card_number', models.CharField(max_length=200)),
                ('cvv_number', models.IntegerField()),
                ('valid_from', models.DateTimeField()),
                ('valid_upto', models.DateTimeField()),
                ('seller_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.seller')),
            ],
            options={
                'verbose_name': 'Seller Payment Detail',
            },
        ),
        migrations.CreateModel(
            name='seller_detail',
            fields=[
                ('seller_detail_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('name', models.CharField(max_length=200)),
                ('email', models.EmailField(max_length=254)),
                ('mobile', models.CharField(max_length=100)),
                ('password', models.CharField(max_length=50)),
                ('deleted', models.BooleanField()),
                ('seller_address_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.seller_address')),
            ],
            options={
                'verbose_name': 'Seller Details',
            },
        ),
        migrations.AddField(
            model_name='seller_address',
            name='seller_type_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.seller_type'),
        ),
        migrations.AddField(
            model_name='seller',
            name='seller_detail_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.seller_detail'),
        ),
        migrations.CreateModel(
            name='product_detail',
            fields=[
                ('product_detail_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('price', models.FloatField()),
                ('tag_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.tag')),
            ],
            options={
                'verbose_name': 'Product Detail',
            },
        ),
        migrations.AddField(
            model_name='product',
            name='product_detail_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.product_detail'),
        ),
        migrations.AddField(
            model_name='product',
            name='seller_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.seller'),
        ),
        migrations.CreateModel(
            name='order_items',
            fields=[
                ('order_item_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('quantity', models.IntegerField()),
                ('order_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.orders')),
                ('product_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.product')),
            ],
            options={
                'verbose_name': 'Ordered Item',
            },
        ),
    ]
