WMS_MAIN/app/model/express_setting.js
2026-04-27 16:09:26 +08:00

59 lines
1.2 KiB
JavaScript

'use strict';
module.exports = app => {
const { INTEGER, STRING, BIGINT, DATE } = 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',
},
deleted_at: {
type: DATE,
allowNull: true,
comment: '删除时间',
},
}, {
tableName: 'wms_express_setting',
freezeTableName: true,
underscored: true,
timestamps: false,
comment: '快递配置表',
indexes: [
{
name: 'idx_express_code',
fields: [ 'express_code' ],
},
{
name: 'idx_warehouse_deleted_at',
fields: [ 'warehouse_id', 'deleted_at' ],
},
],
});
return ExpressSetting;
};