# Generated by Django 2.1.5 on 2019-02-06 02:45

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='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('description', models.TextField(blank=True, max_length=500, null=True)),
                ('parentCategory', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.Category', verbose_name='Parent Category')),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='File_gallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('file', models.FileField(upload_to='media/upload/files')),
                ('description', models.CharField(blank=True, max_length=200, null=True)),
            ],
            options={
                'verbose_name': 'File Gallery',
                'verbose_name_plural': 'File Gallery',
            },
        ),
        migrations.CreateModel(
            name='Image_gallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('pic', models.ImageField(default='media/upload/images/no-img.jpg', upload_to='media/upload/images')),
                ('alt', models.CharField(blank=True, max_length=200, null=True)),
                ('description', models.CharField(blank=True, max_length=200, null=True)),
            ],
            options={
                'verbose_name': 'Image Gallery',
                'verbose_name_plural': 'Image Gallery',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('content', models.TextField(max_length=1000)),
                ('publish_date', models.DateTimeField(auto_now_add=True)),
                ('is_active_comment', models.BooleanField(default=False)),
                ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published'), (3, 'Reopen')], default=1)),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=11)),
                ('has_discount', models.BooleanField(default=False)),
                ('super_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=11, null=True)),
                ('type_of_product', models.IntegerField(choices=[(1, 'Download'), (2, 'Postal')], default=1)),
                ('transportation_class', models.IntegerField(blank=True, choices=[(1, 'Express Post'), (2, 'Normal Post'), (3, 'Tiepaks')], null=True)),
                ('available_in_stock', models.IntegerField(choices=[(1, 'Available'), (2, 'Unavailable'), (3, 'In Prebuy')], default=1)),
                ('pic', models.ImageField(default='media/upload/images/no-img.jpg', upload_to='media/upload/product/images')),
                ('summary', models.CharField(blank=True, max_length=100)),
                ('count_of_download', models.IntegerField(null=True)),
                ('category', models.ManyToManyField(blank=True, to='shop.Category')),
                ('files', models.ManyToManyField(blank=True, to='shop.File_gallery')),
                ('image_gallery', models.ManyToManyField(blank=True, to='shop.Image_gallery')),
                ('related_product', models.ManyToManyField(blank=True, related_name='_product_related_product_+', to='shop.Product', verbose_name='Related Product')),
            ],
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Shop_user',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nik_name', models.CharField(blank=True, max_length=100, null=True)),
                ('website', models.CharField(blank=True, max_length=100, null=True)),
                ('mobile', models.CharField(max_length=11)),
                ('tel', models.CharField(max_length=11)),
                ('profile_pic', models.ImageField(default='media/upload/images/no-img.jpg', upload_to='media/upload/profile/images')),
                ('about', models.TextField(blank=True, max_length=300, null=True)),
                ('postal_code', models.CharField(blank=True, max_length=10, null=True)),
                ('city', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.City')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Shop User',
                'verbose_name_plural': 'Shop User',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='tags',
            field=models.ManyToManyField(blank=True, to='shop.Tag'),
        ),
        migrations.AddField(
            model_name='product',
            name='writer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='city',
            name='province',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Province'),
        ),
    ]
