Files
customer-server/model/entity/account.go
2026-06-10 15:51:41 +08:00

80 lines
3.1 KiB
Go
Raw 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 (
"customer-server/consts/account"
"gitea.redpowerfuture.com/red-future/common/beans"
)
type accountCol struct {
beans.SQLBaseCol
DatasetIds string
DocumentIds string
SpeechcraftIds string
AccountCode string
AccountName string
Status string
Greeting string
KeywordOption 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",
AccountCode: "account_code",
AccountName: "account_name",
Status: "status",
Greeting: "greeting",
KeywordOption: "keyword_option",
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列表"`
AccountCode string `orm:"account_code" json:"accountCode" dc:"客服账号编码"`
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:"开场白"`
KeywordOption []string `orm:"keyword_option" json:"keywordOption" 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:"小红书AccessToken14天有效期"`
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:"卡片触发次数"`
}