# Generated by Django 2.0.4 on 2018-07-09 00:25

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('p_admin', '0001_initial'),
        ('p_pdm', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='atp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('period', models.CharField(help_text='时期：可以是1天，也可以是1周或1月，任意天数时期序列。', max_length=40, verbose_name='时期')),
                ('poqty', models.IntegerField(verbose_name='订单数量')),
                ('forecastqty', models.IntegerField(verbose_name='预测数量')),
                ('supplyqty', models.IntegerField(verbose_name='外购数量')),
                ('productionqty', models.IntegerField(verbose_name='生产数量')),
                ('ATP', models.IntegerField(verbose_name='ATP')),
                ('states', models.CharField(max_length=40, verbose_name='状态')),
                ('updatetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('cell', models.ForeignKey(limit_choices_to={'category': 'C'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='atpcell', to='p_admin.department', verbose_name='Cell')),
                ('dep', models.ForeignKey(limit_choices_to={'category': 'P'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='atpdep', to='p_admin.department', verbose_name='部门')),
            ],
            options={
                'verbose_name': '402ATP',
                'verbose_name_plural': '402ATP',
                'ordering': ['dep', 'cell', 'period'],
            },
        ),
        migrations.CreateModel(
            name='demand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('po', models.CharField(max_length=40, verbose_name='订单')),
                ('poid', models.CharField(max_length=40, verbose_name='订单项次')),
                ('customerid', models.CharField(max_length=40, verbose_name='客户编码')),
                ('customeritem', models.CharField(max_length=80, verbose_name='客户料号')),
                ('item', models.CharField(max_length=80, verbose_name='产品料号')),
                ('itemdesc', models.TextField(verbose_name='产品描述')),
                ('itemspec', models.TextField(verbose_name='产品规格')),
                ('demandqty', models.IntegerField(verbose_name='需求数量')),
                ('shipqty', models.IntegerField(verbose_name='出货数量')),
                ('podate', models.DateField(verbose_name='订单日期')),
                ('demanddate', models.DateField(verbose_name='需求日期')),
                ('states', models.CharField(max_length=40, verbose_name='订单状态')),
                ('updatetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '401客户订单',
                'verbose_name_plural': '401客户订单',
                'ordering': ['po', 'poid'],
            },
        ),
        migrations.CreateModel(
            name='mps',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('po', models.CharField(max_length=40, verbose_name='订单')),
                ('poid', models.CharField(max_length=40, verbose_name='订单项次')),
                ('item', models.CharField(max_length=80, verbose_name='产品料号')),
                ('pqty', models.IntegerField(verbose_name='生产数量')),
                ('pdate', models.DateField(verbose_name='生产日期')),
                ('states', models.CharField(max_length=40, verbose_name='状态')),
                ('updatetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('cell', models.ForeignKey(limit_choices_to={'category': 'C'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='mpscell', to='p_admin.department', verbose_name='Cell')),
                ('dep', models.ForeignKey(limit_choices_to={'category': 'P'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='mpsdep', to='p_admin.department', verbose_name='部门')),
            ],
            options={
                'verbose_name': '403主生产排程',
                'verbose_name_plural': '403主生产排程',
                'ordering': ['pdate', 'po', 'poid'],
            },
        ),
        migrations.CreateModel(
            name='rccp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('upph', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='人时产出(UPPH)')),
                ('cycletime', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='产出节拍')),
                ('takttime', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='需求节拍')),
                ('URT', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='负载率')),
                ('pdate', models.DateField(verbose_name='生产日期')),
                ('states', models.CharField(max_length=40, verbose_name='状态')),
                ('updatetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('cell', models.ForeignKey(limit_choices_to={'category': 'C'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='rccpcell', to='p_admin.department', verbose_name='Cell')),
                ('dep', models.ForeignKey(limit_choices_to={'category': 'P'}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='rccpdep', to='p_admin.department', verbose_name='部门')),
                ('operation', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='rccpoperation', to='p_pdm.operation', verbose_name='工作中心')),
            ],
            options={
                'verbose_name': '404粗略产能规划',
                'verbose_name_plural': '404粗略产能规划',
                'ordering': ['dep', 'cell', 'operation'],
            },
        ),
    ]
