WMS_MAIN/app/model/express_setting.js

49 lines
1004 B
JavaScript

'use strict';
module.exports = app => {
const { INTEGER, STRING, BIGINT } = app.Sequelize;
const ExpressSetting = app.model.define('express_setting', {
id: {
type: INTEGER(11),
primaryKey: true,
autoIncrement: true,
allowNull: false,
comment: '主键ID',
},
express_code: {
type: STRING(50),
allowNull: true,
comment: '快递编码',
},
code: {
type: STRING(50),
allowNull: true,
comment: '设置项编码',
},
warehouse_id: {
type: BIGINT(20).UNSIGNED,
allowNull: true,
comment: '仓库主体ID',
},
}, {
tableName: 'wms_express_setting',
freezeTableName: true,
underscored: true,
timestamps: false,
comment: '快递配置表',
indexes: [
{
name: 'idx_express_code',
fields: [ 'express_code' ],
},
{
name: 'idx_warehouse_id',
fields: [ 'warehouse_id' ],
},
],
});
return ExpressSetting;
};