# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-28 01:10
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('customers', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client_product_id', models.IntegerField(default=0)),
                ('name', models.CharField(default=b'', max_length=200)),
                ('category', models.IntegerField(default=0)),
                ('brand', models.IntegerField(default=0)),
                ('series', models.IntegerField(default=0)),
                ('product_no', models.CharField(default=b'', max_length=200)),
                ('attr_val', models.CharField(default=b'', max_length=100)),
                ('rule_val', models.CharField(default=b'', max_length=100)),
                ('is_ornament', models.IntegerField(default=0)),
                ('status', models.IntegerField(default=0)),
                ('company_id', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('args', models.TextField(default=b'')),
                ('remark', models.TextField(default=b'')),
            ],
        ),
        migrations.CreateModel(
            name='ProductBrand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=b'', max_length=100)),
                ('name_en', models.CharField(default=b'', max_length=100)),
                ('alias_name', models.CharField(default=b'', max_length=100)),
                ('description', models.CharField(default=b'', max_length=300)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('company', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='brands', to='customers.Company')),
                ('user', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='brands', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ProductBrandSeries',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brand_id', models.IntegerField(default=0)),
                ('name', models.CharField(default=b'', max_length=100)),
                ('description', models.CharField(default=b'', max_length=300)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('company', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series', to='customers.Company')),
                ('user', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=b'', max_length=100)),
                ('step', models.IntegerField(default=1)),
                ('status', models.IntegerField(default=1)),
                ('sort_id', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('parent_category', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sub_categories', to='products.ProductCategory')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategoryAttribute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=b'', max_length=100)),
                ('type', models.CharField(default=b'', max_length=10)),
                ('value', models.TextField()),
                ('is_search', models.IntegerField(default=0)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('category', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='attributes', to='products.ProductCategory')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategoryAttributeValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('parent_id', models.IntegerField(default=0)),
                ('name', models.CharField(default=b'', max_length=100)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('attribute', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='values', to='products.ProductCategoryAttribute')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategorySearch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=b'', max_length=100)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('category', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='search', to='products.ProductCategory')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategorySearchValue',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('name', models.CharField(default=b'', max_length=100)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('search', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='values', to='products.ProductCategorySearch')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCommodity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('model', models.CharField(default=b'', max_length=500)),
                ('name', models.CharField(default=b'', max_length=200)),
                ('category', models.CharField(default=b'', max_length=500)),
                ('brand', models.CharField(default=b'', max_length=300)),
                ('series', models.CharField(default=b'', max_length=300)),
                ('model_position', models.TextField()),
                ('account_limit', models.TextField()),
                ('company_id', models.IntegerField(default=0)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('product', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='commodities', to='products.Product')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCommodityGoods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=b'', max_length=200)),
                ('sale_title', models.CharField(default=b'', max_length=300)),
                ('category', models.CharField(default=b'', max_length=500)),
                ('brand', models.CharField(default=b'', max_length=300)),
                ('series', models.CharField(default=b'', max_length=300)),
                ('param_search', models.TextField()),
                ('param_full', models.TextField()),
                ('description', models.TextField()),
                ('price', models.FloatField(default=0)),
                ('price_advise', models.FloatField(default=0)),
                ('inventory', models.IntegerField(default=0)),
                ('company_id', models.IntegerField(default=0)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('commodity', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='goods', to='products.ProductCommodity')),
            ],
        ),
        migrations.CreateModel(
            name='ProductModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.IntegerField(default=0)),
                ('version_no', models.CharField(default=b'', max_length=200)),
                ('norms_no', models.CharField(default=b'', max_length=200)),
                ('name', models.CharField(default=b'', max_length=200)),
                ('material', models.CharField(default=b'', max_length=100)),
                ('norms', models.CharField(default=b'', max_length=100)),
                ('technics', models.CharField(default=b'', max_length=100)),
                ('model_path', models.CharField(default=b'', max_length=300)),
                ('chartlet_path', models.CharField(default=b'', max_length=300)),
                ('color', models.CharField(default=b'', max_length=10)),
                ('status', models.IntegerField(default=0)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
            ],
        ),
    ]
