# Generated by Django 3.0.3 on 2021-01-11 17:54

import django.contrib.postgres.fields
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import store.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=64)),
                ('Brand_image', models.ImageField(upload_to='brand/images')),
            ],
        ),
        migrations.CreateModel(
            name='Product_type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=200)),
                ('Created', models.DateTimeField(auto_now_add=True)),
                ('Last_updated', models.DateTimeField(auto_now=True)),
                ('Meta_data', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=150), default=store.models.return_array, size=None)),
            ],
            options={
                'verbose_name': 'Product_type',
                'verbose_name_plural': 'Product_types',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=64)),
                ('Created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Tag',
                'verbose_name_plural': 'Tags',
            },
        ),
        migrations.CreateModel(
            name='TopBar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Created', models.DateTimeField(auto_now_add=True)),
                ('Last_updated', models.DateTimeField(auto_now=True)),
                ('Name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Topbar_images',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=48)),
                ('Image', models.ImageField(upload_to='genimages')),
                ('Related_topbar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Images', to='store.TopBar')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Created', models.DateTimeField(auto_now_add=True)),
                ('Last_updated', models.DateTimeField(auto_now=True)),
                ('Added_by', models.CharField(default='Rohit admin', max_length=64)),
                ('Name', models.CharField(max_length=512)),
                ('Thumbnail', models.ImageField(upload_to='products/thumbnails')),
                ('Main_image', models.ImageField(upload_to='products/main_images')),
                ('Images', django.contrib.postgres.fields.ArrayField(base_field=models.ImageField(upload_to='products/Images'), default=store.models.return_array, size=None)),
                ('Cost_to_customer', models.PositiveIntegerField()),
                ('Cost_to_seller', models.PositiveIntegerField()),
                ('Crossed_price', models.PositiveIntegerField()),
                ('Local_offer', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(90)])),
                ('Description', models.TextField()),
                ('Highlights', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=164), default=store.models.return_array, size=None)),
                ('Meta_data', django.contrib.postgres.fields.jsonb.JSONField(default=store.models.return_dict)),
                ('Rating', models.FloatField(validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(0)])),
                ('Nums_of_rating', models.PositiveIntegerField()),
                ('Total_sales', models.PositiveIntegerField()),
                ('Total_views', models.PositiveIntegerField()),
                ('Total_carts', models.PositiveIntegerField()),
                ('Sales_probablity', models.FloatField(validators=[django.core.validators.MaxValueValidator(1)])),
                ('Cart_probablity', models.FloatField(validators=[django.core.validators.MaxValueValidator(1), django.core.validators.MinValueValidator(0)])),
                ('Tags', models.ManyToManyField(related_name='All_products', to='store.Tag')),
                ('Type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='All_products', to='store.Product_type')),
            ],
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=128)),
                ('Created', models.DateTimeField(auto_now_add=True)),
                ('Last_updated', models.DateTimeField(auto_now=True)),
                ('Description', models.TextField(max_length=256)),
                ('All_products', models.ManyToManyField(related_name='In_collection', to='store.Product')),
            ],
        ),
    ]
