# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-10 09:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dept',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dept_id', models.CharField(default=0, max_length=20, unique=True, verbose_name='部门编号')),
                ('name', models.CharField(max_length=30, verbose_name='部门名称')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
            ],
            options={
                'verbose_name': '部门表',
                'verbose_name_plural': '部门表',
            },
        ),
        migrations.CreateModel(
            name='Dept_Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dept_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Dept', verbose_name='部门名称')),
            ],
            options={
                'verbose_name': '部门——供应商表',
                'verbose_name_plural': '部门——供应商表',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('employee_id', models.CharField(default=0, max_length=20, unique=True, verbose_name='员工编号')),
                ('name', models.CharField(max_length=30, verbose_name='姓名')),
                ('gender', models.CharField(choices=[('male', '男'), ('female', '女')], default='female', max_length=10)),
                ('phone', models.IntegerField(default=0, verbose_name='电话')),
                ('birthday', models.DateTimeField(default=datetime.datetime.now, verbose_name='出生日期')),
                ('address', models.CharField(max_length=30, verbose_name='住址')),
                ('IdentityCard', models.CharField(max_length=18, verbose_name='身份证')),
                ('dept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Dept', verbose_name='所属部门')),
            ],
            options={
                'verbose_name': '员工表',
                'verbose_name_plural': '员工表',
            },
        ),
        migrations.CreateModel(
            name='PriductUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='计量单位名称')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Employee', verbose_name='操作员')),
            ],
            options={
                'verbose_name': '商品计量单位表',
                'verbose_name_plural': '商品计量单位表',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.CharField(default=0, max_length=20, unique=True, verbose_name='商品编号')),
                ('name', models.CharField(max_length=30, verbose_name='商品名称')),
                ('Price', models.IntegerField(default=0, verbose_name='参考价格(元)')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Employee', verbose_name='操作员')),
                ('priductunit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.PriductUnit', verbose_name='商品计量单位')),
            ],
            options={
                'verbose_name': '商品目录表',
                'verbose_name_plural': '商品目录表',
            },
        ),
        migrations.CreateModel(
            name='Product_Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Product', verbose_name='商品名称')),
            ],
            options={
                'verbose_name': '商品——供应商表',
                'verbose_name_plural': '商品——供应商表',
            },
        ),
        migrations.CreateModel(
            name='ProductSpec',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='商品规格名称')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Employee', verbose_name='操作员')),
            ],
            options={
                'verbose_name': '商品规格表',
                'verbose_name_plural': '商品规格表',
            },
        ),
        migrations.CreateModel(
            name='StoreHouse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('storehouse_id', models.CharField(default=0, max_length=20, unique=True, verbose_name='仓库编号')),
                ('address', models.CharField(max_length=30, verbose_name='地址')),
                ('phone', models.IntegerField(default=0, verbose_name='电话')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='仓库成立日期')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Employee', verbose_name='操作员')),
            ],
            options={
                'verbose_name': '货物仓库表',
                'verbose_name_plural': '货物仓库表',
            },
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('supplier_id', models.CharField(default=0, max_length=20, unique=True, verbose_name='供应商编号')),
                ('name', models.CharField(max_length=30, verbose_name='供应商名称')),
                ('address', models.CharField(max_length=30, verbose_name='地址')),
                ('phone', models.IntegerField(default=0, verbose_name='电话')),
                ('postalcode', models.IntegerField(default=0, verbose_name='邮编')),
            ],
            options={
                'verbose_name': '供应商表',
                'verbose_name_plural': '供应商表',
            },
        ),
        migrations.AddField(
            model_name='product_supplier',
            name='supplier',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Supplier', verbose_name='供应商名称'),
        ),
        migrations.AddField(
            model_name='product',
            name='productspec',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.ProductSpec', verbose_name='商品规格'),
        ),
        migrations.AddField(
            model_name='dept_supplier',
            name='supplier_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jinhuo.Supplier', verbose_name='供应商名称'),
        ),
    ]
