36 lines
766 B
JavaScript
36 lines
766 B
JavaScript
'use strict';
|
|
|
|
module.exports = app => {
|
|
const { STRING } = app.Sequelize;
|
|
|
|
const Platform = app.model.define('platform', {
|
|
code: {
|
|
type: STRING(50),
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
comment: '平台代码',
|
|
},
|
|
name: {
|
|
type: STRING(255),
|
|
allowNull: false,
|
|
comment: '平台名称',
|
|
},
|
|
default_express_interface: {
|
|
type: STRING(50),
|
|
allowNull: false,
|
|
comment: '默认快递接口',
|
|
},
|
|
}, {
|
|
tableName: 'wms_platform',
|
|
freezeTableName: true,
|
|
timestamps: false,
|
|
underscored: true,
|
|
comment: '平台表',
|
|
});
|
|
|
|
// 移除 associate 方法,稍后在单独的初始化文件中定义关联
|
|
// 或者在控制器中动态定义关联
|
|
|
|
return Platform;
|
|
};
|