# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-07-13 03:52
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import shop.fields


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0004_category'),
    ]

    operations = [
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='\u54c1\u724c\u540d\u79f0')),
                ('addtime', models.DateTimeField(auto_now_add=True, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('logo', models.ImageField(upload_to='images/Logo', verbose_name='\u5546\u6807')),
                ('brand_description', models.CharField(max_length=5555, verbose_name='\u54c1\u724c\u63cf\u8ff0')),
                ('small_logo', models.CharField(max_length=255, verbose_name='logo\u7f29\u7565\u56fe')),
                ('order', shop.fields.OrderField(blank=True)),
            ],
            options={
                'verbose_name': '\u54c1\u724c',
                'verbose_name_plural': '\u54c1\u724c',
            },
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=360, verbose_name='\u5546\u54c1\u540d\u79f0')),
                ('market_price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='\u5e02\u573a\u4ef7\u683c')),
                ('shop_price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='\u672c\u5e97\u4ef7\u683c')),
                ('goods_description', models.CharField(max_length=5555, verbose_name='\u5546\u54c1\u63cf\u8ff0')),
                ('goods_sale_number', models.BigIntegerField(verbose_name='\u9500\u552e\u91cf')),
                ('is_on_sale', models.BooleanField(default=0, verbose_name='\u662f\u5426\u4e0a\u67b6')),
                ('addtime', models.DateTimeField(auto_now_add=True, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('is_new', models.BooleanField(default=0, verbose_name='\u662f\u5426\u65b0\u54c1')),
                ('is_recommand', models.BooleanField(default=0, verbose_name='\u662f\u5426\u63a8\u8350')),
                ('goods_stock_number', models.BigIntegerField(verbose_name='\u5e93\u5b58\u91cf')),
                ('order', shop.fields.OrderField(blank=True)),
                ('brand_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Brand', verbose_name='\u54c1\u724c')),
                ('category_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Category', verbose_name='\u5206\u7c7b')),
            ],
            options={
                'verbose_name': '\u5546\u54c1',
                'verbose_name_plural': '\u5546\u54c1',
            },
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='\u7c7b\u578b\u540d\u79f0')),
            ],
            options={
                'verbose_name': '\u7c7b\u578b',
                'verbose_name_plural': '\u7c7b\u578b',
            },
        ),
        migrations.DeleteModel(
            name='Product',
        ),
        migrations.AddField(
            model_name='goods',
            name='type_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Type', verbose_name='\u7c7b\u578b'),
        ),
    ]
