Files
OMS/app/console/dbschema/material_package.php
2026-01-04 17:22:44 +08:00

160 lines
5.6 KiB
PHP

<?php
/**
* Copyright 2026 ShopeX (https://www.shopex.cn)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
$db['material_package'] = array(
'columns' => array(
'id' => array(
'type' => 'int unsigned',
'required' => true,
'pkey' => true,
'extra' => 'auto_increment',
'label' => 'ID',
'width' => 110,
'hidden' => true,
'editable' => false,
),
'mp_bn' => array(
'type' => 'varchar(255)',
'label' => '加工单号',
'default_in_list' => true,
'in_list' => true,
'searchtype' => 'nequal',
'filtertype' => 'normal',
'filterdefault' => true,
'order' => 10,
'width' => 200,
),
'mp_name' => array(
'type' => 'varchar(255)',
'label' => '加工单名称',
'default_in_list' => true,
'in_list' => true,
'searchtype' => 'nequal',
'filtertype' => 'normal',
'filterdefault' => true,
'order' => 20,
'width' => 200,
),
'branch_id' => array(
'type' => 'table:branch@ome',
'label' => '仓库名称',
'default_in_list' => true,
'in_list' => true,
'order' => 30,
),
'status' => array(
'type' => array(
1 => '待处理',
2 => '已确定',
3 => '已取消',
4 => '已完成',
5 => '处理中',
),
'default' => 1,
'label' => '单据状态',
'in_list' => true,
'default_in_list' => true,
'order' => 40,
),
'service_type' => array(
'type' => array(
1 => '仓内组合加工',
2 => '仓内组合拆分',
),
'default' => 1,
'label' => '加工类型',
'in_list' => true,
'default_in_list' => true,
'order' => 50,
),
'sync_status' => array(
'type' => array(
1 => '未同步',
2 => '已同步',
3 => '同步失败',
),
'default' => 1,
'label' => '同步状态',
'in_list' => true,
'default_in_list' => true,
'order' => 70,
),
'sync_msg' => array(
'type' => 'text',
'default' => '',
'label' => '失败信息',
'in_list' => true,
'default_in_list' => true,
'order' => 75,
),
'out_mp_bn' => array(
'type' => 'varchar(255)',
'default' => '',
'label' => '外部单号',
'in_list' => true,
'default_in_list' => true,
'order' => 80,
),
'memo' => array(
'type' => 'text',
'default_in_list' => true,
'in_list' => true,
'filtertype' => 'normal',
'filterdefault' => true,
'label' => '单据备注',
'order' => 90,
),
'complete_time' => array(
'type' => 'TIMESTAMP',
'label' => '完成时间',
'default_in_list' => true,
'in_list' => true,
'order' => 95,
),
'at_time' => array(
'type' => 'TIMESTAMP',
'label' => '创建时间',
'default_in_list' => true,
'in_list' => true,
'filtertype' => 'time',
'filterdefault' => true,
'default' => 'CURRENT_TIMESTAMP',
'order' => 100,
),
'up_time' => array(
'type' => 'TIMESTAMP',
'label' => '更新时间',
'default_in_list' => true,
'in_list' => true,
'filtertype' => 'time',
'filterdefault' => true,
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
'order' => 110,
),
),
'index' => array(
'idx_mp_bn' => array('columns' => array('mp_bn'), 'prefix' => 'UNIQUE'),
'idx_mp_name' => array('columns' => array('mp_name')),
'idx_status' => array('columns' => array('status')),
'idx_at_time' => array('columns' => array('at_time')),
'idx_up_time' => array('columns' => array('up_time')),
),
'engine' => 'innodb',
'version' => '$Rev: $',
'comment' => '库存调整表',
);