# Generated by Django 2.1.7 on 2020-12-14 12:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sales', '0094_auto_20201214_1239'),
        ('company', '0095_auto_20201214_1239'),
    ]

    operations = [
        migrations.CreateModel(
            name='Banners',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to=mall.models.image_upload, verbose_name='轮播图')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '轮播图管理',
                'verbose_name_plural': '轮播图管理',
            },
        ),
        migrations.CreateModel(
            name='Boards',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subtitle', models.CharField(max_length=300, verbose_name='大标题')),
                ('content', models.CharField(max_length=3000, verbose_name='内容')),
                ('endtm', models.DateTimeField(verbose_name='结束时间')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '资讯发布',
                'verbose_name_plural': '资讯发布',
            },
        ),
        migrations.CreateModel(
            name='Delivery_Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='快递公司名称')),
                ('code', models.CharField(max_length=30, verbose_name='快递公司编码')),
                ('abbr', models.CharField(max_length=30, verbose_name='快递公司简称')),
            ],
            options={
                'verbose_name': '快递公司',
                'verbose_name_plural': '快递公司',
            },
        ),
        migrations.CreateModel(
            name='Order_Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.SmallIntegerField(blank=True, null=True, verbose_name='评分')),
                ('product_name', models.CharField(max_length=300, verbose_name='产品名称')),
                ('product_image', models.CharField(max_length=500, verbose_name='产品图片')),
                ('product_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='价值')),
                ('content', models.CharField(blank=True, max_length=1000, null=True, verbose_name='评价内容')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
        ),
        migrations.CreateModel(
            name='Order_Detail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_number', models.CharField(max_length=50, verbose_name='订单号')),
                ('product_id', models.IntegerField(blank=True, null=True, verbose_name='产品ID')),
                ('num', models.SmallIntegerField(blank=True, null=True, verbose_name='数量')),
                ('product_name', models.CharField(max_length=300, verbose_name='产品名称')),
                ('product_image', models.CharField(max_length=500, verbose_name='产品图片')),
                ('product_desc', models.CharField(blank=True, max_length=500, null=True, verbose_name='产品描述')),
                ('product_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='价值')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '订单详情',
                'verbose_name_plural': '订单详情',
            },
        ),
        migrations.CreateModel(
            name='Order_Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status_name', models.CharField(max_length=50, verbose_name='订单状态')),
                ('order_type', models.SmallIntegerField(blank=True, null=True, verbose_name='订单类型')),
            ],
            options={
                'verbose_name': '订单状态',
                'verbose_name_plural': '订单状态',
            },
        ),
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_number', models.CharField(max_length=50, verbose_name='订单号')),
                ('order_type', models.SmallIntegerField(blank=True, null=True, verbose_name='订单类型')),
                ('total_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='总价值')),
                ('remarks', models.CharField(max_length=1000, verbose_name='备注')),
                ('user_name', models.CharField(max_length=10, verbose_name='姓名')),
                ('user_phone', models.CharField(max_length=30, verbose_name='电话号码')),
                ('user_address', models.CharField(max_length=500, verbose_name='地址')),
                ('province', models.CharField(max_length=100, verbose_name='省')),
                ('city', models.CharField(max_length=100, verbose_name='市')),
                ('county', models.CharField(max_length=100, verbose_name='区')),
                ('street', models.CharField(max_length=200, verbose_name='街道')),
                ('deliver_company_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='快递公司')),
                ('deliver_company_code', models.CharField(blank=True, max_length=50, null=True, verbose_name='快递单号')),
                ('deliver_tm', models.DateTimeField(blank=True, null=True, verbose_name='发货时间')),
                ('shouhuo_tm', models.DateTimeField(blank=True, null=True, verbose_name='收货时间')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('deliver_company', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Delivery_Company')),
                ('status', models.ForeignKey(blank=True, default=0, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Order_Status')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.ConsumerAccount', verbose_name='用户')),
            ],
            options={
                'verbose_name': '订单信息',
                'verbose_name_plural': '订单信息',
            },
        ),
        migrations.CreateModel(
            name='Points_Product_Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cat_name', models.CharField(max_length=50, verbose_name='分类名称')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
            ],
        ),
        migrations.CreateModel(
            name='Points_Products',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(max_length=300, verbose_name='商品名称')),
                ('product_image', models.ImageField(blank=True, null=True, upload_to=mall.models.image_upload, verbose_name='商品图片')),
                ('product_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='总价值')),
                ('product_desc', models.CharField(max_length=3000, verbose_name='商品介绍')),
                ('product_content', models.CharField(max_length=10000, verbose_name='商品内容')),
                ('face_to', models.SmallIntegerField(blank=True, null=True, verbose_name='面向')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('cat', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Points_Product_Category', verbose_name='分类ID')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '产品管理',
                'verbose_name_plural': '产品管理',
            },
        ),
        migrations.CreateModel(
            name='Points_Products_Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to=mall.models.image_upload, verbose_name='轮播图')),
                ('sort_id', models.SmallIntegerField(blank=True, default=0, null=True, verbose_name='排序')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mall.Points_Products', verbose_name='产品')),
            ],
            options={
                'verbose_name': '产品轮播图管理',
                'verbose_name_plural': '产品轮播图管理',
            },
        ),
        migrations.CreateModel(
            name='Settings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('exchange_rate', models.IntegerField(blank=True, default=1, null=True, verbose_name='汇率')),
                ('is_open', models.BooleanField(default=True, verbose_name='是否开放')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '积分商城设置',
                'verbose_name_plural': '积分商城设置',
            },
        ),
        migrations.CreateModel(
            name='User_Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='姓名')),
                ('phone', models.CharField(max_length=50, verbose_name='手机号码')),
                ('address', models.CharField(max_length=500, verbose_name='地址信息')),
                ('province', models.CharField(max_length=100, verbose_name='省')),
                ('city', models.CharField(max_length=100, verbose_name='市')),
                ('county', models.CharField(max_length=100, verbose_name='区、县')),
                ('street', models.CharField(max_length=100, verbose_name='街道')),
                ('address_detail', models.CharField(max_length=300, verbose_name='详细地址')),
                ('area_code', models.CharField(max_length=100, verbose_name='地区编码')),
                ('is_default', models.BooleanField(default=False, verbose_name='是否默认')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.ConsumerAccount', verbose_name='用户')),
            ],
            options={
                'verbose_name': '用户地址',
                'verbose_name_plural': '用户地址',
            },
        ),
        migrations.CreateModel(
            name='UserPoints',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField(blank=True, null=True, verbose_name='积分数量')),
                ('is_freeze', models.BooleanField(default=False, verbose_name='是否冻结')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='更新时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.ConsumerAccount', verbose_name='用户')),
            ],
            options={
                'verbose_name': '用户积分',
                'verbose_name_plural': '用户积分',
            },
        ),
        migrations.AddField(
            model_name='order_detail',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Orders', verbose_name='订单ID'),
        ),
        migrations.AddField(
            model_name='order_comment',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Orders', verbose_name='订单ID'),
        ),
        migrations.AddField(
            model_name='order_comment',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='mall.Points_Products', verbose_name='商品'),
        ),
        migrations.AddField(
            model_name='order_comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.ConsumerAccount', verbose_name='用户'),
        ),
    ]
