feat: 添加客服账号管理及WebSocket功能
This commit is contained in:
27
consts/account/platform.go
Normal file
27
consts/account/platform.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package account
|
||||
|
||||
import "github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
var (
|
||||
PlatformXHS = newPlatform(gconv.PtrString("xiaohongshu"), "小红书")
|
||||
PlatformDY = newPlatform(gconv.PtrString("douyin"), "抖音")
|
||||
PlatformKS = newPlatform(gconv.PtrString("kuaishou"), "快手")
|
||||
)
|
||||
|
||||
type Platform *string
|
||||
|
||||
type platform struct {
|
||||
code Platform
|
||||
desc string
|
||||
}
|
||||
|
||||
func (s platform) Code() Platform {
|
||||
return s.code
|
||||
}
|
||||
func (s platform) Desc() string {
|
||||
return s.desc
|
||||
}
|
||||
|
||||
func newPlatform(code Platform, desc string) platform {
|
||||
return platform{code: code, desc: desc}
|
||||
}
|
||||
@@ -2,12 +2,6 @@ package public
|
||||
|
||||
// sql 数据库表名
|
||||
const (
|
||||
TableNameAccount = "account"
|
||||
TableNameDataset = "dataset"
|
||||
TableNameKeyword = "keyword"
|
||||
)
|
||||
|
||||
// es 索引名称
|
||||
const (
|
||||
IndexNameDocumentChunk = "document_chunk" // 文档分块索引
|
||||
TableNameAccount = "account"
|
||||
TableNameScriptedSpeech = "scripted_speech"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user