# Generated by Django 2.2 on 2020-07-03 03:13

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')),
                ('cname', models.CharField(max_length=10, verbose_name='类别名称')),
            ],
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('color_name', models.CharField(max_length=10, verbose_name='颜色名称')),
                ('color_url', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gname', models.CharField(max_length=100, verbose_name='商品名称')),
                ('gbesc', models.CharField(max_length=100, verbose_name='商品描述')),
                ('oldprice', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='原价')),
                ('price', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='现价')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.Category')),
            ],
        ),
        migrations.CreateModel(
            name='GoodsDetailName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gdname', models.CharField(max_length=30, verbose_name='商品详情名称')),
            ],
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sname', models.CharField(max_length=10, verbose_name='商品尺寸')),
            ],
        ),
        migrations.CreateModel(
            name='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.PositiveIntegerField(verbose_name='库存数量')),
                ('color', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.Color')),
                ('goods', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.Goods')),
                ('size', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.Size')),
            ],
        ),
        migrations.CreateModel(
            name='GoodsDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gdurl', models.ImageField(upload_to='')),
                ('goods', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.Goods')),
                ('goods_detail_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods_app.GoodsDetailName')),
            ],
        ),
    ]
