# Generated by Django 2.1 on 2018-08-29 15:09

from django.db import migrations, models
import django.db.models.deletion
import mptt.fields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BasicModel',
            fields=[
                ('model_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('model_name', models.CharField(max_length=30, unique=True, verbose_name='模型名称')),
                ('model_value', models.CharField(max_length=30, unique=True)),
                ('create_by', models.CharField(blank=True, max_length=30, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('update_by', models.CharField(blank=True, max_length=30, null=True)),
                ('update_time', models.DateTimeField(auto_now=True, null=True)),
                ('del_flag', models.BooleanField(blank=True, null=True)),
                ('remark', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name': '系统模型',
                'verbose_name_plural': '系统模型',
            },
        ),
        migrations.CreateModel(
            name='BasicModelExtend',
            fields=[
                ('extend_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('extend_name', models.CharField(max_length=30, unique=True, verbose_name='扩展属性')),
                ('extend_value', models.CharField(max_length=30, unique=True)),
                ('create_by', models.CharField(blank=True, max_length=30, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('update_by', models.CharField(blank=True, max_length=30, null=True)),
                ('update_time', models.DateTimeField(auto_now=True, null=True)),
                ('del_flag', models.BooleanField(blank=True, null=True)),
                ('remark', models.CharField(blank=True, max_length=50, null=True)),
                ('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='model_extend', to='SysSetting.BasicModel')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('category_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('category_name', models.CharField(max_length=20, verbose_name='类别名称')),
                ('category_value', models.CharField(max_length=30)),
                ('if_sealed', models.BooleanField(default=False, verbose_name='是否密封类')),
                ('create_by', models.CharField(blank=True, max_length=30, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('update_by', models.CharField(blank=True, max_length=30, null=True)),
                ('update_time', models.DateTimeField(auto_now=True, null=True)),
                ('del_flag', models.BooleanField(blank=True, null=True)),
                ('remark', models.CharField(blank=True, max_length=50, null=True)),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='SysSetting.Category', verbose_name='上级分类')),
            ],
            options={
                'verbose_name': '2.分类设置',
                'verbose_name_plural': '2.分类设置',
            },
        ),
        migrations.CreateModel(
            name='ObjectCode',
            fields=[
                ('object_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('object_name', models.CharField(max_length=30, null=True, verbose_name='名称')),
                ('object_value', models.CharField(max_length=40, null=True, verbose_name='编码')),
                ('type', models.CharField(max_length=30, verbose_name='类型')),
                ('specification', models.CharField(max_length=30, verbose_name='规格')),
                ('unit', models.CharField(max_length=30, verbose_name='单位')),
                ('create_by', models.CharField(blank=True, max_length=30, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('update_by', models.CharField(blank=True, max_length=30, null=True)),
                ('update_time', models.DateTimeField(auto_now=True, null=True)),
                ('del_flag', models.BooleanField(blank=True, null=True)),
                ('remark', models.CharField(blank=True, max_length=50, null=True)),
                ('category', mptt.fields.TreeManyToManyField(to='SysSetting.Category', verbose_name='编码分类')),
                ('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='model_material', to='SysSetting.BasicModel', verbose_name='基础模型')),
            ],
            options={
                'verbose_name': '系统编码',
                'verbose_name_plural': '系统编码',
            },
        ),
        migrations.CreateModel(
            name='ObjectExtend',
            fields=[
                ('extend_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('extend_value', models.CharField(max_length=30)),
                ('create_by', models.CharField(blank=True, max_length=30, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('update_by', models.CharField(blank=True, max_length=30, null=True)),
                ('update_time', models.DateTimeField(auto_now=True, null=True)),
                ('del_flag', models.BooleanField(blank=True, null=True)),
                ('remark', models.CharField(blank=True, max_length=50, null=True)),
                ('basic_model_extend', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SysSetting.BasicModelExtend')),
                ('object_code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SysSetting.ObjectCode')),
            ],
            options={
                'verbose_name': '3.1.物料编码_扩展属性',
                'verbose_name_plural': '3.1.物料编码_扩展属性',
            },
        ),
    ]
