77 lines
2.9 KiB
Go
77 lines
2.9 KiB
Go
package entity
|
||
|
||
import (
|
||
"customer-server/consts/account"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
)
|
||
|
||
type accountCol struct {
|
||
beans.SQLBaseCol
|
||
DatasetIds string
|
||
DocumentIds string
|
||
SpeechcraftIds string
|
||
AccountName string
|
||
Status string
|
||
Greeting string
|
||
Prompt string
|
||
SelfIdentity string
|
||
Platform string
|
||
AccessToken string
|
||
AppId string
|
||
SecretKey string
|
||
XhsUserId string
|
||
ContactCardMessage string
|
||
NameCardMessage string
|
||
CardTriggerCount string
|
||
}
|
||
|
||
var AccountCol = accountCol{
|
||
SQLBaseCol: beans.DefSQLBaseCol,
|
||
DatasetIds: "dataset_ids",
|
||
DocumentIds: "document_ids",
|
||
SpeechcraftIds: "speechcraft_ids",
|
||
AccountName: "account_name",
|
||
Status: "status",
|
||
Greeting: "greeting",
|
||
Prompt: "prompt",
|
||
SelfIdentity: "self_identity",
|
||
Platform: "platform",
|
||
AccessToken: "access_token",
|
||
AppId: "app_id",
|
||
SecretKey: "secret_key",
|
||
XhsUserId: "xhs_user_id",
|
||
ContactCardMessage: "contact_card_message",
|
||
NameCardMessage: "name_card_message",
|
||
CardTriggerCount: "card_trigger_count",
|
||
}
|
||
|
||
type Account struct {
|
||
beans.SQLBaseDO `orm:",inline"`
|
||
|
||
DatasetIds []int64 `orm:"dataset_ids" json:"datasetIds" dc:"绑定的数据集ID列表"`
|
||
DocumentIds []int64 `orm:"document_ids" json:"documentIds" dc:"绑定的文档ID列表"`
|
||
AccountName string `orm:"account_name" json:"accountName" dc:"客服账号名称"`
|
||
Status account.Status `orm:"status" json:"status" dc:"客服账号状态"`
|
||
Platform account.Platform `orm:"platform" json:"platform" dc:"客服平台"`
|
||
Greeting string `orm:"greeting" json:"greeting" dc:"开场白"`
|
||
Prompt []string `orm:"prompt" json:"prompt" dc:"提示词"`
|
||
SelfIdentity string `orm:"self_identity" json:"selfIdentity" dc:"AI身份描述"`
|
||
ExpandData *AccountExpandData `orm:"expand_data" json:"expandData" description:"扩展数据(JSONB)"`
|
||
}
|
||
|
||
type AccountExpandData struct {
|
||
Xhs XhsExpandData `orm:",inline" json:"xhs"`
|
||
}
|
||
|
||
type XhsExpandData struct {
|
||
// 小红书平台专属字段(仅platform=xiaohongshu时有效)
|
||
AccessToken string `orm:"access_token" json:"accessToken" dc:"小红书AccessToken(14天有效期)"`
|
||
AppId int64 `orm:"app_id" json:"appId" dc:"小红书应用ID"`
|
||
SecretKey string `orm:"secret_key" json:"secretKey" dc:"小红书加解密密钥"`
|
||
XhsUserId string `orm:"xhs_user_id" json:"xhsUserId" dc:"小红书用户ID"`
|
||
ContactCardMessage string `orm:"contact_card_message" json:"contactCardMessage" dc:"留资卡文案"`
|
||
NameCardMessage string `orm:"name_card_message" json:"nameCardMessage" dc:"名片文案"`
|
||
CardTriggerCount int `orm:"card_trigger_count" json:"cardTriggerCount" dc:"卡片触发次数"`
|
||
}
|