WMS_MAIN/app/model/express_setting.js
2026-04-17 19:21:57 +08:00

54 lines
1.1 KiB
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: false,
comment: '系统快递编码',
},
code: {
type: STRING(50),
allowNull: false,
comment: '自设编码',
},
name: {
type: STRING(50),
allowNull: false,
comment: '别名',
},
warehouse_id: {
type: BIGINT(20).UNSIGNED,
allowNull: false,
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;
};