# Generated by Django 3.1.4 on 2021-08-29 08:55

import core.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('email', models.EmailField(max_length=64, unique=True)),
                ('name', models.CharField(max_length=64)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_type', models.CharField(default='Tshirt', max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DesignAppendCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_name', models.CharField(max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DesignUpload',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to=core.models.design_upload_append_image_file_path)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_id', models.IntegerField()),
                ('create_order_datetime', models.DateTimeField(default=django.utils.timezone.now)),
                ('shipper_date', models.DateTimeField()),
                ('paid_datetime', models.DateTimeField(null=True)),
                ('paid', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('address1', models.CharField(max_length=255)),
                ('address2', models.CharField(max_length=255)),
                ('phone', models.CharField(max_length=11, unique=True)),
                ('age', models.IntegerField(null=True)),
                ('city', models.CharField(default='Tehran', max_length=64)),
                ('province', models.CharField(default='Tehran', max_length=64)),
                ('postal_code', models.CharField(max_length=32, null=True)),
                ('country', models.CharField(default='IRAN', max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(max_length=64)),
                ('address', models.CharField(max_length=255)),
                ('type_good', models.CharField(max_length=64)),
                ('discount_type', models.CharField(max_length=64, null=True)),
                ('url', models.URLField(max_length=100, null=True, unique=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Shipper',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(max_length=64)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_brand', models.CharField(max_length=64)),
                ('product_name', models.CharField(max_length=64)),
                ('product_description', models.CharField(max_length=512, null=True)),
                ('price_irr', models.IntegerField()),
                ('product_available', models.BooleanField(default=True)),
                ('discount_available', models.BooleanField(default=True)),
                ('discount', models.FloatField(default=0.0)),
                ('available_size', models.BooleanField(default=True)),
                ('available_colors', models.BooleanField(default=True)),
                ('size', models.CharField(max_length=64)),
                ('color', models.CharField(default='No color', max_length=64)),
                ('weight_gram', models.FloatField(null=True)),
                ('units_in_stock', models.IntegerField(null=True)),
                ('units_on_order_per_day', models.IntegerField(null=True)),
                ('image_front', models.ImageField(upload_to=core.models.product_image_file_path)),
                ('image_back', models.ImageField(upload_to=core.models.product_image_file_path)),
                ('image_side_left', models.ImageField(upload_to=core.models.product_image_file_path)),
                ('image_side_right', models.ImageField(upload_to=core.models.product_image_file_path)),
                ('rainking', models.FloatField(null=True)),
                ('note', models.CharField(max_length=512, null=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.category')),
                ('supplier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.supplier')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.IntegerField()),
                ('quantity', models.IntegerField()),
                ('product_brand', models.CharField(max_length=64)),
                ('product_name', models.CharField(max_length=64)),
                ('product_description', models.CharField(max_length=512, null=True)),
                ('price_irr', models.IntegerField()),
                ('total_price_irr', models.IntegerField()),
                ('discount', models.FloatField(default=0.0)),
                ('size', models.CharField(max_length=64)),
                ('color', models.CharField(default='No color', max_length=64)),
                ('weight_gram', models.FloatField(null=True)),
                ('final_product_image_front', models.ImageField(upload_to=core.models.design_image_file_path)),
                ('final_product_image_back', models.ImageField(upload_to=core.models.design_image_file_path)),
                ('final_product_image_side_left', models.ImageField(upload_to=core.models.design_image_file_path)),
                ('final_product_image_side_right', models.ImageField(upload_to=core.models.design_image_file_path)),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.order')),
            ],
        ),
        migrations.CreateModel(
            name='DesignAppend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('design_append_price_irr', models.IntegerField()),
                ('image', models.ImageField(upload_to=core.models.design_append_image_file_path)),
                ('design_append_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.designappendcategory')),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('address1', models.CharField(max_length=255)),
                ('address2', models.CharField(max_length=255, null=True)),
                ('age', models.IntegerField(null=True)),
                ('city', models.CharField(default='Tehran', max_length=64)),
                ('province', models.CharField(default='Tehran', max_length=64)),
                ('phone', models.CharField(max_length=11, unique=True)),
                ('postal_code', models.CharField(max_length=32)),
                ('country', models.CharField(default='IRAN', max_length=64)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
