WMS_MAIN/app/model/qimen_log.js

82 lines
1.6 KiB
JavaScript

// app/model/qimen_log.js
'use strict';
module.exports = app => {
const { STRING, INTEGER, BIGINT, TEXT, DATE, BOOLEAN } = app.Sequelize;
const QimenLog = app.model.define('qimen_log', {
id: {
type: BIGINT(20).UNSIGNED,
primaryKey: true,
autoIncrement: true,
},
from_key: {
type: INTEGER(10),
allowNull: true,
field: 'from_key',
},
method: {
type: STRING(100),
allowNull: true,
},
sign: {
type: STRING(100),
allowNull: true,
},
costomer_id: {
type: STRING(50),
allowNull: true,
field: 'costomer_id',
},
v: {
type: STRING(50),
allowNull: true,
},
url: {
type: TEXT,
allowNull: true,
},
created_at: {
type: DATE,
allowNull: true,
},
body: {
type: TEXT('long'),
allowNull: true,
},
result: {
type: TEXT('long'),
allowNull: true,
},
use_time: {
type: INTEGER(12),
allowNull: true,
field: 'use_time',
},
updated_at: {
type: DATE,
allowNull: true,
},
deleted_at: {
type: DATE,
allowNull: true,
},
to_key: {
type: INTEGER(10),
allowNull: true,
defaultValue: 23535631,
field: 'to_key',
},
}, {
// 模型配置
timestamps: false, // 禁用Sequelize的自动时间戳
freezeTableName: true, // 强制表名等于模型名
tableName: 'wms_qimen_log', // 数据库中的实际表名
underscored: false, // 保持字段名原样(不转换为下划线格式)
paranoid: false, // 不使用软删除
});
return QimenLog;
};