1
This commit is contained in:
81
api/model/chat_reply_intent_log.js
Normal file
81
api/model/chat_reply_intent_log.js
Normal file
@@ -0,0 +1,81 @@
|
||||
const Sequelize = require('sequelize');
|
||||
|
||||
/**
|
||||
* 沟通回复意图 AI 调用记录
|
||||
* 记录 getReplyContentFromDetail 中 replyIntentAndContent 的入参与结果,便于排查与统计
|
||||
*/
|
||||
module.exports = (db) => {
|
||||
const chat_reply_intent_log = db.define('chat_reply_intent_log', {
|
||||
sn_code: {
|
||||
comment: '设备SN码',
|
||||
type: Sequelize.STRING(50),
|
||||
allowNull: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
platform: {
|
||||
comment: '平台: boss / liepin',
|
||||
type: Sequelize.STRING(20),
|
||||
allowNull: true,
|
||||
defaultValue: 'boss'
|
||||
},
|
||||
friendId: {
|
||||
comment: '好友/会话ID',
|
||||
type: Sequelize.BIGINT,
|
||||
allowNull: true
|
||||
},
|
||||
encrypt_friend_id: {
|
||||
comment: '好友加密ID',
|
||||
type: Sequelize.STRING(100),
|
||||
allowNull: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
hr_message_text: {
|
||||
comment: 'HR 最新消息原文(AI 入参)',
|
||||
type: Sequelize.TEXT,
|
||||
allowNull: true
|
||||
},
|
||||
action: {
|
||||
comment: 'AI 返回意图: no_reply/text/send_resume/exchange_wechat/exchange_phone',
|
||||
type: Sequelize.STRING(30),
|
||||
allowNull: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
reply_content: {
|
||||
comment: 'AI 返回的回复文案',
|
||||
type: Sequelize.TEXT,
|
||||
allowNull: true
|
||||
},
|
||||
replied: {
|
||||
comment: '是否执行了回复',
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: true,
|
||||
defaultValue: false
|
||||
},
|
||||
reason: {
|
||||
comment: '未回复时的原因',
|
||||
type: Sequelize.STRING(200),
|
||||
allowNull: true
|
||||
},
|
||||
job_name: {
|
||||
comment: '职位名称(便于排查)',
|
||||
type: Sequelize.STRING(200),
|
||||
allowNull: true
|
||||
},
|
||||
create_time: {
|
||||
comment: '创建时间',
|
||||
type: Sequelize.DATE,
|
||||
allowNull: true,
|
||||
defaultValue: Sequelize.NOW
|
||||
}
|
||||
}, {
|
||||
timestamps: false,
|
||||
indexes: [
|
||||
{ unique: false, fields: ['sn_code', 'platform', 'friendId'] },
|
||||
{ unique: false, fields: ['create_time'] }
|
||||
]
|
||||
});
|
||||
|
||||
// chat_reply_intent_log.sync({ force: true });
|
||||
|
||||
return chat_reply_intent_log;
|
||||
};
|
||||
Reference in New Issue
Block a user