# Generated by Django 2.2.7 on 2020-09-03 16:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('address_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('contact', models.IntegerField()),
                ('email', models.EmailField(default=0, max_length=254)),
                ('pin_code', models.IntegerField()),
                ('place', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=200)),
                ('state', models.CharField(max_length=200)),
                ('land_mark', models.CharField(max_length=200)),
                ('alternative_no', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='AddToCart',
            fields=[
                ('cart_id', models.AutoField(primary_key=True, serialize=False)),
                ('orders', models.BooleanField(default=False)),
                ('qty', models.IntegerField(default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('owner_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('contact', models.IntegerField()),
                ('email_id', models.EmailField(max_length=254)),
                ('address', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=200)),
                ('password', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Sweets',
            fields=[
                ('sweet_id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=200)),
                ('sweet_image', models.ImageField(upload_to='media/')),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('user_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('contact', models.IntegerField()),
                ('email_id', models.EmailField(max_length=254)),
                ('addresses', models.CharField(max_length=200)),
                ('password', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('ordered', models.BooleanField(default=False)),
                ('order_date', models.DateTimeField(auto_now_add=True)),
                ('order', models.DateTimeField(null=True)),
                ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.Address')),
                ('items', models.ManyToManyField(to='shop.AddToCart')),
            ],
        ),
        migrations.AddField(
            model_name='addtocart',
            name='sweet_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Sweets'),
        ),
        migrations.AddField(
            model_name='addtocart',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Users'),
        ),
        migrations.AddField(
            model_name='address',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Users'),
        ),
    ]
