WMS_MAIN/app/model/platform.js
liufumingren 9845a239e2 1
2026-05-16 02:44:53 +08:00

83 lines
1.7 KiB
JavaScript

'use strict';
/**
* 平台表模型定义。
* @param {import('egg').Application} app Egg 应用实例
* @return {import('sequelize').ModelCtor<import('sequelize').Model>} 平台模型
*/
module.exports = app => {
const { STRING, INTEGER } = app.Sequelize;
const Platform = app.model.define('platform', {
code: {
type: STRING(50),
primaryKey: true,
allowNull: false,
comment: '平台代码',
},
name: {
type: STRING(255),
allowNull: true,
comment: '平台名称',
},
interface_url: {
type: STRING(255),
allowNull: true,
comment: '接口地址',
},
platform_code: {
type: STRING(255),
allowNull: true,
comment: '平台编码',
},
platid: {
type: INTEGER(11),
allowNull: true,
comment: '平台ID',
},
appkey: {
type: STRING(255),
allowNull: true,
comment: '应用Key',
},
app_secret: {
type: STRING(255),
allowNull: true,
comment: '应用密钥',
},
token: {
type: STRING(255),
allowNull: true,
comment: '访问令牌',
},
version: {
type: STRING(255),
allowNull: true,
comment: '接口版本',
},
shoptype: {
type: STRING(50),
allowNull: true,
comment: '店铺类型',
},
ordersource: {
type: STRING(50),
allowNull: true,
comment: '订单来源',
},
component: {
type: STRING(255),
allowNull: true,
comment: '打印组件标识',
},
}, {
tableName: 'wms_platform',
freezeTableName: true,
timestamps: false,
underscored: true,
comment: '平台表',
});
return Platform;
};