'use strict'; module.exports = app => { const { INTEGER, STRING, BIGINT, TINYINT } = app.Sequelize; const ExpressInterface = app.model.define('express_interface', { id: { type: INTEGER(11).UNSIGNED, primaryKey: true, autoIncrement: true, allowNull: false, comment: '主键ID', }, name: { type: STRING(255), allowNull: true, comment: '接口名称', }, express_code: { type: STRING(255), allowNull: true, comment: '快递编码', }, warehouse_id: { type: BIGINT(20).UNSIGNED, allowNull: true, comment: '仓库编码', }, platform_code: { type: STRING(20), allowNull: true, comment: '平台id', }, express_platform_id: { type: INTEGER(11), allowNull: true, comment: '快递接口id', }, sender_name: { type: STRING(50), allowNull: true, comment: '寄件人', }, sender_tel: { type: STRING(11), allowNull: true, comment: '寄件电话', }, weight: { type: INTEGER(11), allowNull: true, comment: '排序', }, token: { type: STRING(500), allowNull: true, comment: '令牌', }, viewer: { type: STRING(50), allowNull: true, comment: '验视员', }, client_id: { type: STRING(50), allowNull: true, comment: '客户id', }, is_share: { type: TINYINT(1), allowNull: true, defaultValue: 0, comment: '是否分享接口', }, share_id: { type: INTEGER(11).UNSIGNED, allowNull: true, comment: '分享id', }, can_use_count: { type: INTEGER(11), allowNull: true, defaultValue: 0, comment: '可用数量', }, province_name: { type: STRING(255), allowNull: true, comment: '寄件人名称', }, city_name: { type: STRING(255), allowNull: true, comment: '寄件人城市', }, district_name: { type: STRING(255), allowNull: true, comment: '寄件人区/县', }, site_code: { type: STRING(255), allowNull: true, comment: '网点编码', }, product_type: { type: STRING(50), allowNull: true, comment: '产品编码', }, shop_name: { type: STRING(255), allowNull: true, comment: '平台店铺', }, }, { tableName: 'wms_express_interface', freezeTableName: true, underscored: true, timestamps: false, paranoid: false, comment: '快递接口配置表', indexes: [ { name: 'idx_warehouse_id', fields: [ 'warehouse_id' ], }, ], }); return ExpressInterface; };