# Generated by Django 2.1.3 on 2018-11-28 19:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField(default=1)),
            ],
        ),
        migrations.CreateModel(
            name='color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Enter a Color for Product', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.CharField(max_length=500)),
                ('date', models.DateField(auto_now_add=True)),
                ('status', models.CharField(choices=[('t', "It's Ok"), ('w', 'Waiting')], default='w', max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='contact_us',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('desc', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='coupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20)),
                ('count', models.IntegerField()),
                ('off', models.IntegerField(help_text='Off precent')),
                ('expire', models.DateTimeField(verbose_name='Expire Date')),
            ],
        ),
        migrations.CreateModel(
            name='Kala',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(allow_unicode=True)),
                ('name', models.CharField(max_length=150)),
                ('size', models.CharField(max_length=10)),
                ('mindesc', models.CharField(max_length=200)),
                ('pic0', models.ImageField(default='media/static/KalaImages/no-image.jpg', height_field='imageheigth', upload_to='KalaImages/20181128 - 195352', width_field='imagewidth')),
                ('pic1', models.ImageField(blank=True, default='media/static/KalaImages/no-image.jpg', null=True, upload_to='KalaImages/20181128 - 195352')),
                ('pic2', models.ImageField(blank=True, default='media/static/KalaImages/no-image.jpg', null=True, upload_to='KalaImages/20181128 - 195352')),
                ('pic3', models.ImageField(blank=True, default='media/static/KalaImages/no-image.jpg', null=True, upload_to='KalaImages/20181128 - 195352')),
                ('desc', models.TextField(null=True)),
                ('imagewidth', models.PositiveIntegerField(default=220, editable=False)),
                ('imageheigth', models.PositiveIntegerField(default=330, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='kalaCat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(allow_unicode=True)),
                ('name', models.CharField(max_length=100)),
                ('gen', models.CharField(choices=[('f', 'female'), ('m', 'Men'), ('o', 'Not mind')], default='o', max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='KalaInst',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.BigIntegerField(verbose_name='Price')),
                ('off', models.IntegerField(default=0)),
                ('instock', models.IntegerField()),
                ('kala', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='kalainst', to='shop.Kala')),
                ('saler', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Manufactor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(allow_unicode=True, blank=True, null=True)),
                ('name', models.CharField(max_length=100)),
                ('logo', models.ImageField(blank=True, default='media/static/ManuLogo/no-image.jpg', height_field='imageheigth', null=True, upload_to='ManuLogo/', width_field='imagewidth')),
                ('imagewidth', models.PositiveIntegerField(default=50, editable=False)),
                ('imageheigth', models.PositiveIntegerField(default=50, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='MyUsers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=15)),
                ('city', models.CharField(blank=True, max_length=100, null=True)),
                ('address', models.CharField(blank=True, max_length=500, null=True)),
                ('postcode', models.CharField(blank=True, max_length=10, null=True)),
                ('KhabarName', models.CharField(blank=True, choices=[('TRUE', 'مشترک خبرنامه'), ('FALSE', 'عدم اشتراک در خبرنامه')], default='FALSE', max_length=5, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Salled',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company', models.CharField(max_length=200, null=True)),
                ('address', models.CharField(max_length=500)),
                ('zip_code', models.CharField(max_length=10, verbose_name='Zip Code')),
                ('city', models.CharField(max_length=50)),
                ('total_price', models.BigIntegerField(help_text='Total Price With offers & Coupons')),
                ('send_price', models.IntegerField()),
                ('tax', models.IntegerField()),
                ('total', models.BigIntegerField(help_text='Total Price With offers, Coupons, tax & send price.')),
                ('desc', models.TextField(blank=True, null=True)),
                ('date', models.DateField(auto_now=True)),
                ('sent', models.CharField(choices=[('F', 'Packege Wait for send'), ('T', 'Packege sent'), ('B', 'Back to Store')], default='F', help_text='Is package sent?', max_length=1, verbose_name='Send Status')),
                ('products', models.ManyToManyField(to='shop.cart', verbose_name='Products')),
            ],
        ),
        migrations.CreateModel(
            name='States',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.AddField(
            model_name='salled',
            name='state',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.States'),
        ),
        migrations.AddField(
            model_name='salled',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Buyer'),
        ),
        migrations.AddField(
            model_name='myusers',
            name='state',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shop.States'),
        ),
        migrations.AddField(
            model_name='myusers',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='MyUsers', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='kalacat',
            unique_together={('name', 'gen')},
        ),
        migrations.AddField(
            model_name='kala',
            name='cat',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='category', to='shop.kalaCat', verbose_name='Category'),
        ),
        migrations.AddField(
            model_name='kala',
            name='color',
            field=models.ManyToManyField(help_text='Select Colors for Product', to='shop.color'),
        ),
        migrations.AddField(
            model_name='kala',
            name='manu',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='manufactor', to='shop.Manufactor', verbose_name='Manufactor'),
        ),
        migrations.AddField(
            model_name='comment',
            name='Kala',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.Kala'),
        ),
        migrations.AddField(
            model_name='comment',
            name='writer',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='cart',
            name='color',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='color', to='shop.color'),
        ),
        migrations.AddField(
            model_name='cart',
            name='coupon',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shop.coupon'),
        ),
        migrations.AddField(
            model_name='cart',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Kala', verbose_name='Products'),
        ),
        migrations.AddField(
            model_name='cart',
            name='saler',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instance', to='shop.KalaInst'),
        ),
        migrations.AddField(
            model_name='cart',
            name='username',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
