feat: 添加客服账号管理及WebSocket功能
This commit is contained in:
90
model/dto/account_dto.go
Normal file
90
model/dto/account_dto.go
Normal file
@@ -0,0 +1,90 @@
|
||||
// Package dto - 客服账号DTO
|
||||
// 功能:客服账号的增删改查请求响应结构体
|
||||
package dto
|
||||
|
||||
import (
|
||||
"customer-server/consts/account"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAccountReq 添加客服账号
|
||||
type AddAccountReq struct {
|
||||
g.Meta `path:"/add" method:"post" tags:"客服账号管理" summary:"添加客服账号" dc:"创建新的客服账号"`
|
||||
|
||||
DatasetIds []int64 `json:"datasetIds" v:"required#数据集ID不能为空" dc:"数据集ID列表"`
|
||||
DocumentIds []int64 `json:"documentIds" v:"required#文档ID不能为空" dc:"文档ID列表"`
|
||||
AccountName string `json:"accountName" v:"required#客服账号名称不能为空"`
|
||||
Status account.Status `json:"status" dc:"客服账号状态"`
|
||||
Greeting string `json:"greeting" dc:"开场白"`
|
||||
Prompt []string `json:"prompt" dc:"提示词"`
|
||||
SelfIdentity string `json:"selfIdentity" dc:"AI身份描述"`
|
||||
Platform account.Platform `json:"platform" v:"required#客服平台不能为空" dc:"客服平台"`
|
||||
}
|
||||
|
||||
type AddAccountRes struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAccountReq 更新客服账号
|
||||
type UpdateAccountReq struct {
|
||||
g.Meta `path:"/update" method:"post" tags:"客服账号管理" summary:"更新客服账号" dc:"更新客服账号信息"`
|
||||
|
||||
Id int64 `json:"id" v:"required#客服账号ID不能为空" dc:"客服账号ID"`
|
||||
DatasetIds []int64 `json:"datasetIds" dc:"数据集ID列表"`
|
||||
DocumentIds []int64 `json:"documentIds" dc:"文档ID列表"`
|
||||
AccountName string `json:"accountName" dc:"客服账号名称"`
|
||||
Status account.Status `json:"status" dc:"客服账号状态"`
|
||||
Greeting string `json:"greeting" dc:"开场白"`
|
||||
Prompt []string `json:"prompt" dc:"提示词"`
|
||||
SelfIdentity string `json:"selfIdentity" dc:"AI身份描述"`
|
||||
Platform account.Platform `json:"platform" dc:"客服平台"`
|
||||
}
|
||||
|
||||
// DeleteAccountReq 删除客服账号
|
||||
type DeleteAccountReq struct {
|
||||
g.Meta `path:"/delete" method:"post" tags:"客服账号管理" summary:"删除客服账号" dc:"删除指定客服账号"`
|
||||
Id int64 `json:"id" v:"required#客服账号ID不能为空" dc:"客服账号ID"`
|
||||
}
|
||||
|
||||
// GetAccountReq 获取单个客服账号
|
||||
type GetAccountReq struct {
|
||||
g.Meta `path:"/getOne" method:"get" tags:"客服账号管理" summary:"获取客服账号详情" dc:"根据ID获取单个客服账号信息"`
|
||||
Id int64 `json:"id" v:"required#客服账号ID不能为空" dc:"客服账号ID"`
|
||||
}
|
||||
|
||||
// ListAccountReq 获取客服账号列表
|
||||
type ListAccountReq struct {
|
||||
g.Meta `path:"/list" method:"get" tags:"客服账号管理" summary:"获取客服账号列表" dc:"分页查询客服账号,支持按账号名称、状态、平台筛选"`
|
||||
Page *beans.Page `json:"page"`
|
||||
Keyword string `json:"keyword" dc:"关键字"`
|
||||
AccountName string `json:"accountName" dc:"客服账号名称"`
|
||||
Status account.Status `json:"status" dc:"客服账号状态"`
|
||||
Platform account.Platform `json:"platform" dc:"客服平台"`
|
||||
}
|
||||
|
||||
type ListAccountRes struct {
|
||||
List []*AccountVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// AccountVO 客服账号视图对象
|
||||
type AccountVO struct {
|
||||
Id int64 `json:"id,string"`
|
||||
DatasetIds []int64 `json:"datasetIds,string"`
|
||||
DocumentIds []int64 `json:"documentIds,string"`
|
||||
AccountName string `json:"accountName"`
|
||||
Status account.Status `json:"status"`
|
||||
Greeting string `json:"greeting"`
|
||||
Prompt []string `json:"prompt"`
|
||||
SelfIdentity string `json:"selfIdentity"`
|
||||
Platform account.Platform `json:"platform"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// GetByAccountNameReq 根据账号名称获取客服账号
|
||||
type GetByAccountNameReq struct {
|
||||
AccountName string `json:"accountName" dc:"客服账号名称"`
|
||||
}
|
||||
Reference in New Issue
Block a user