Files
customer-server/model/entity/customer_service_account.go
2026-03-14 10:02:49 +08:00

34 lines
2.3 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
import (
"gitea.com/red-future/common/beans"
)
// CustomerServiceAccount 客服账号实体
const CustomerServiceAccountCollection = "customer_service_account"
type CustomerServiceAccount struct {
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
// 业务字段
AccountName string `bson:"accountName" json:"accountName"` // 客服账号名称(如cs_xhs_qixue
IsDisabled bool `bson:"isDisabled" json:"isDisabled"` // 是否禁用(true-禁用,false-启用)
Greeting string `bson:"greeting" json:"greeting"` // 开场白(WebSocket连接时自动发送)
Prompt string `bson:"-" json:"prompt"` // 提示词(不存储到MongoDB,查询时从ragflow_config关联获取)
SelfIdentity string `bson:"selfIdentity" json:"selfIdentity"` // AI身份描述(前端显示为"AI身份"
// 绑定的资源(主体持有关系)
SpeechcraftIds []string `bson:"speechcraftIds" json:"speechcraftIds"` // 绑定的话术ID列表
ProductIds []string `bson:"productIds" json:"productIds"` // 绑定的产品ID列表
Platform string `bson:"platform" json:"platform"` // 客服平台(如:xiaohongshu、douyin、kuaishou
// 小红书平台专属字段(仅platform=xiaohongshu时有效)
AccessToken string `bson:"accessToken,omitempty" json:"accessToken,omitempty"` // 小红书AccessToken14天有效期)
AppId int64 `bson:"appId,omitempty" json:"appId,omitempty"` // 小红书应用ID
SecretKey string `bson:"secretKey,omitempty" json:"secretKey,omitempty"` // 小红书加解密密钥
XhsUserId string `bson:"xhsUserId,omitempty" json:"xhsUserId,omitempty"` // 小红书用户ID
ContactCardMessage string `bson:"contactCardMessage,omitempty" json:"contactCardMessage,omitempty"` // 留资卡文案(不同领域客服使用不同文案)
NameCardMessage string `bson:"nameCardMessage,omitempty" json:"nameCardMessage,omitempty"` // 名片文案(不同领域客服使用不同文案)
CardTriggerCount int `bson:"cardTriggerCount,omitempty" json:"cardTriggerCount,omitempty"` // 卡片触发次数(默认5,不同客服可定制)
}