# Generated by Django 2.0 on 2018-04-03 22:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('catId', models.CharField(blank=True, max_length=30, null=True)),
                ('name', models.CharField(max_length=30)),
                ('baseApiURL', models.URLField(blank=True, max_length=2500, null=True)),
                ('deltaGetURL', models.URLField(blank=True, max_length=2500, null=True)),
                ('topFeedsURL', models.URLField(blank=True, max_length=2500, null=True)),
                ('feedsListed', models.BooleanField(default=False)),
                ('last_updated_on', models.DateTimeField(blank=True, null=True)),
                ('last_version', models.PositiveIntegerField(default=0)),
                ('current_version', models.PositiveIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='CuelinkOffer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('offerId', models.CharField(max_length=10)),
                ('title', models.CharField(max_length=1024)),
                ('merchant', models.CharField(max_length=126)),
                ('categories', models.CharField(blank=True, max_length=256, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('terms', models.TextField(blank=True, null=True)),
                ('coupoun_code', models.CharField(blank=True, max_length=50, null=True)),
                ('url', models.URLField(max_length=2500)),
                ('status', models.CharField(max_length=10)),
                ('startTime', models.DateTimeField()),
                ('endTime', models.DateTimeField()),
                ('imageUrl', models.URLField(max_length=2500)),
            ],
        ),
        migrations.CreateModel(
            name='DOTD',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=250)),
                ('description', models.CharField(blank=True, max_length=256, null=True)),
                ('url', models.URLField(max_length=500)),
                ('availability', models.CharField(blank=True, max_length=10, null=True)),
                ('created_on', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='DOTDImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(max_length=20)),
                ('url', models.URLField(max_length=2500)),
                ('dotd', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.DOTD')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('availability', models.CharField(blank=True, max_length=10, null=True)),
                ('category', models.CharField(blank=True, max_length=30, null=True)),
                ('description', models.CharField(blank=True, max_length=256, null=True)),
                ('endTime', models.DateTimeField()),
                ('startTime', models.DateTimeField()),
                ('title', models.CharField(max_length=250)),
                ('url', models.TextField()),
                ('created_on', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='OfferImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(max_length=20)),
                ('url', models.URLField(max_length=2500)),
                ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Offer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PriceHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('retailPrice', models.FloatField(default=0)),
                ('sellingPrice', models.FloatField(default=0)),
                ('specialPrice', models.FloatField(default=0)),
                ('status', models.CharField(choices=[('-1', 'decreased'), ('0', 'fixed'), ('1', 'increased')], default='0', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('productId', models.CharField(max_length=30)),
                ('title', models.CharField(max_length=500)),
                ('productUrl', models.URLField(max_length=500)),
                ('brand', models.CharField(max_length=50)),
                ('inStock', models.BooleanField(default=False)),
                ('codAvailable', models.BooleanField(default=False)),
                ('discountPercentage', models.FloatField(default=0.0)),
                ('topSeller', models.BooleanField(default=False)),
                ('category', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='shopping.Category')),
            ],
        ),
        migrations.CreateModel(
            name='ProductDescription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(max_length=20)),
                ('url', models.URLField(max_length=2500)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductLinks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source', models.CharField(blank=True, max_length=50, null=True)),
                ('link', models.URLField(max_length=2500)),
            ],
        ),
        migrations.CreateModel(
            name='ProductOffer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=300)),
                ('products', models.ManyToManyField(to='shopping.Product')),
            ],
        ),
        migrations.CreateModel(
            name='ProductPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated_on', models.DateTimeField(auto_now_add=True)),
                ('retailPrice', models.FloatField(default=0)),
                ('sellingPrice', models.FloatField(default=0)),
                ('discountPercentage', models.FloatField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='SearchProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('productId', models.CharField(max_length=30)),
                ('title', models.CharField(max_length=500)),
                ('productUrl', models.URLField(max_length=500)),
                ('brand', models.CharField(max_length=50)),
                ('inStock', models.BooleanField(default=False)),
                ('codAvailable', models.BooleanField(default=False)),
                ('topSeller', models.BooleanField(default=False)),
                ('catName', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SearchProductImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(max_length=20)),
                ('url', models.URLField(max_length=2500)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.SearchProduct')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('short_name', models.CharField(blank=True, max_length=10, null=True)),
                ('home_url', models.URLField(max_length=150)),
                ('description', models.TextField(blank=True, null=True)),
                ('affiliate_id', models.CharField(max_length=100)),
                ('affiliate_token', models.CharField(max_length=250)),
                ('logo_image', models.ImageField(null=True, upload_to='stores/')),
            ],
        ),
        migrations.AddField(
            model_name='searchproduct',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='search_products', to='shopping.Store'),
        ),
        migrations.AddField(
            model_name='productprice',
            name='product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='prices', to='shopping.SearchProduct'),
        ),
        migrations.AddField(
            model_name='productlinks',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.SearchProduct'),
        ),
        migrations.AddField(
            model_name='productdescription',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.SearchProduct'),
        ),
        migrations.AddField(
            model_name='product',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Store'),
        ),
        migrations.AddField(
            model_name='pricehistory',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prices', to='shopping.Product'),
        ),
        migrations.AddField(
            model_name='offer',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Store'),
        ),
        migrations.AddField(
            model_name='dotd',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Store'),
        ),
        migrations.AddField(
            model_name='category',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Store'),
        ),
    ]
