# Generated by Django 2.1.7 on 2019-03-13 16:15

from django.db import migrations, models
import public.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Batch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=20, unique=True, verbose_name='批次编号')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建日期')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='更新日期')),
            ],
            options={
                'verbose_name': '批次',
                'verbose_name_plural': '批次',
            },
        ),
        migrations.CreateModel(
            name='Block',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=20, unique=True, verbose_name='编号')),
                ('weight', models.DecimalField(decimal_places=2, max_digits=5, null=True, verbose_name='重量')),
                ('long', models.IntegerField(blank=True, null=True, verbose_name='长')),
                ('width', models.IntegerField(blank=True, null=True, verbose_name='宽')),
                ('height', models.IntegerField(blank=True, null=True, verbose_name='高')),
                ('m3', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='立方')),
                ('uom', models.CharField(choices=[('t', '吨'), ('m3', '立方')], default='t', max_length=10, verbose_name='荒料计量单位')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='更新日期')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建日期')),
                ('_slab_yield', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='出材率')),
                ('old_system_slab_yield', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='旧系统出材率')),
            ],
            options={
                'verbose_name': '荒料资料',
                'ordering': ['category', 'batch', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=20, unique=True, verbose_name='名称')),
                ('created', models.DateField(auto_now_add=True, verbose_name='添加日期')),
            ],
            options={
                'verbose_name': '品种分类',
                'verbose_name_plural': '品种分类',
            },
        ),
        migrations.CreateModel(
            name='DraftPackageList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=20, verbose_name='编号')),
                ('thickness', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='厚度规格')),
                ('created', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('from_path', models.URLField(blank=True, null=True, verbose_name='返回页面')),
            ],
            options={
                'verbose_name': '草稿码单',
            },
        ),
        migrations.CreateModel(
            name='DraftPackageListItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('long', models.SmallIntegerField(help_text='cm', verbose_name='长')),
                ('height', models.SmallIntegerField(help_text='cm', verbose_name='高')),
                ('kl1', models.SmallIntegerField(blank=True, null=True, verbose_name='长1')),
                ('kl2', models.SmallIntegerField(blank=True, null=True, verbose_name='长2')),
                ('kh1', models.SmallIntegerField(blank=True, null=True, verbose_name='高1')),
                ('kh2', models.SmallIntegerField(blank=True, null=True, verbose_name='高2')),
                ('part_number', models.SmallIntegerField(verbose_name='夹号')),
                ('line', public.fields.LineField(blank=True, verbose_name='序号')),
            ],
            options={
                'verbose_name': '草稿码单行',
            },
        ),
        migrations.CreateModel(
            name='PackageList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('return_path', models.URLField(blank=True, null=True, verbose_name='返回链接')),
            ],
            options={
                'verbose_name': '码单',
            },
        ),
        migrations.CreateModel(
            name='PackageListItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('part_number', models.SmallIntegerField(verbose_name='夹号')),
                ('line', public.fields.LineField(blank=True, verbose_name='序号')),
            ],
            options={
                'verbose_name': '码单项',
                'ordering': ('part_number', 'line'),
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('block', '荒料'), ('semi_slab', '毛板'), ('slab', '板材')], default='block', max_length=10, verbose_name='类型')),
                ('thickness', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='厚度规格')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='更新日期')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建日期')),
                ('activate', models.BooleanField(default=False, verbose_name='启用')),
                ('semi_slab_single_qty', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='毛板单件平方')),
            ],
            options={
                'verbose_name': '产品资料',
                'verbose_name_plural': '产品资料',
            },
        ),
        migrations.CreateModel(
            name='Quarry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='矿口名称')),
                ('desc', models.CharField(blank=True, max_length=200, null=True, verbose_name='描述信息')),
                ('created', models.DateField(auto_now_add=True, verbose_name='添加日期')),
                ('updated', models.DateField(auto_now=True, verbose_name='更新日期')),
            ],
            options={
                'verbose_name': '矿口信息',
                'verbose_name_plural': '矿口信息',
            },
        ),
        migrations.CreateModel(
            name='Slab',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('long', models.SmallIntegerField(help_text='cm', verbose_name='长')),
                ('height', models.SmallIntegerField(help_text='cm', verbose_name='高')),
                ('kl1', models.SmallIntegerField(blank=True, null=True, verbose_name='长1')),
                ('kl2', models.SmallIntegerField(blank=True, null=True, verbose_name='长2')),
                ('kh1', models.SmallIntegerField(blank=True, null=True, verbose_name='高1')),
                ('kh2', models.SmallIntegerField(blank=True, null=True, verbose_name='高2')),
                ('part_number', models.SmallIntegerField(verbose_name='夹号')),
                ('line', models.SmallIntegerField(verbose_name='序号')),
                ('is_reserve', models.BooleanField(default=False, verbose_name='锁库')),
            ],
            options={
                'verbose_name': '板材',
                'verbose_name_plural': '板材',
            },
        ),
    ]
