notifyLock method + logs print.send logs order export methods + docs express model fields SPH/XHS/DW/JD + migration platform_shop_id migration notifyLock docs order export docs
87 lines
1.7 KiB
JavaScript
87 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, JSON } = app.Sequelize;
|
|
|
|
const Express = app.model.define('express', {
|
|
code: {
|
|
type: STRING(50),
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
comment: '快递编码',
|
|
},
|
|
name: {
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '快递名称',
|
|
},
|
|
KS: {
|
|
type: STRING(255),
|
|
field: 'KS',
|
|
allowNull: true,
|
|
comment: '快手编码',
|
|
},
|
|
polyapi_extra_info: {
|
|
type: JSON,
|
|
allowNull: true,
|
|
comment: '聚合接口扩展信息',
|
|
},
|
|
PDD: {
|
|
field: 'PDD',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '拼多多编码',
|
|
},
|
|
DY: {
|
|
field: 'DY',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '抖音编码',
|
|
},
|
|
CAINIAO: {
|
|
field: 'CAINIAO',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '菜鸟编码',
|
|
},
|
|
SPH: {
|
|
field: 'SPH',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: 'SPH编码',
|
|
},
|
|
XHS: {
|
|
field: 'XHS',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '小红书编码',
|
|
},
|
|
DW: {
|
|
field: 'DW',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: 'DW编码',
|
|
},
|
|
JD: {
|
|
field: 'JD',
|
|
type: STRING(255),
|
|
allowNull: true,
|
|
comment: '京东编码',
|
|
},
|
|
}, {
|
|
tableName: 'wms_express',
|
|
freezeTableName: true,
|
|
underscored: true,
|
|
timestamps: false,
|
|
paranoid: false,
|
|
comment: '快递基础信息表',
|
|
});
|
|
|
|
return Express;
|
|
};
|