# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-06-09 02:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.AutoField(db_index=True, primary_key=True, serialize=False)),
                ('GoodsAmount', models.PositiveIntegerField()),
                ('GoodsName', models.CharField(max_length=30)),
                ('GoodsPrice', models.IntegerField()),
                ('GoodsPicture', models.ImageField(upload_to='goods')),
            ],
            options={
                'db_table': 'goods',
            },
        ),
        migrations.CreateModel(
            name='GOODSCATAGORY',
            fields=[
                ('name', models.CharField(max_length=100, primary_key=True, serialize=False)),
            ],
            options={
                'db_table': 'goodsCatagory',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(db_index=True, primary_key=True, serialize=False)),
                ('Order_time', models.DateTimeField(auto_now=True)),
                ('Goods_num', models.IntegerField()),
                ('Goods_price', models.IntegerField()),
                ('Order_total', models.IntegerField()),
                ('Customer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Customer')),
                ('Goods_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods.Goods')),
            ],
            options={
                'db_table': 'order',
            },
        ),
        migrations.AddField(
            model_name='goods',
            name='GoodsCatagory',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods.GOODSCATAGORY'),
        ),
    ]
