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

76 lines
1.6 KiB
JavaScript

'use strict';
module.exports = app => {
const { INTEGER, STRING } = app.Sequelize;
const ExpressPlatform = app.model.define('express_platform', {
id: {
type: INTEGER(10),
primaryKey: true,
autoIncrement: true,
allowNull: false,
comment: '接口ID',
},
interface_url: {
type: STRING(500),
allowNull: false,
comment: '外部接口URL',
},
platform_code: {
type: STRING(50),
allowNull: false,
comment: '平台代码,用于应用分流',
},
interface_name: {
type: STRING(200),
allowNull: false,
comment: '接口名称',
},
platid: {
type: STRING(20),
allowNull: true,
comment: '菠萝派平台id',
},
appkey: {
type: STRING(100),
allowNull: true,
comment: '应用Key',
},
app_secret: {
type: STRING(255),
allowNull: true,
field: 'app_secret',
comment: '应用密钥',
},
token: {
type: STRING(255),
allowNull: true,
comment: '访问令牌',
},
version: {
type: STRING(20),
allowNull: true,
comment: '接口版本',
},
}, {
tableName: 'wms_express_platform',
freezeTableName: true,
underscored: true,
timestamps: false,
paranoid: false,
comment: '快递外部接口配置表',
indexes: [
{
name: 'idx_platform_code',
fields: [ 'platform_code' ],
},
{
name: 'idx_interface_name',
fields: [ 'interface_name' ],
},
],
});
return ExpressPlatform;
};