# Generated by Django 2.1 on 2018-08-13 07:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('desc', models.TextField()),
                ('picture', models.ImageField(blank=True, upload_to='category')),
            ],
            options={
                'db_table': '商品类别表',
                'verbose_name': '商品类别表',
            },
        ),
        migrations.CreateModel(
            name='products',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('desc', models.TextField()),
                ('picture', models.ImageField(blank=True, upload_to='category')),
                ('price', models.DecimalField(decimal_places=4, max_digits=10)),
                ('kucun', models.IntegerField(default=0)),
                ('onshelf', models.BooleanField(default=True)),
                ('Createtime', models.DateTimeField(auto_now_add=True)),
                ('Modtime', models.DateTimeField(auto_now_add=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shopping.Category')),
            ],
            options={
                'db_table': '商品列表',
                'ordering': ('Createtime',),
                'verbose_name': '商品列表',
            },
        ),
    ]
