97 lines
4.4 KiB
Go
97 lines
4.4 KiB
Go
// Package dto - 客服账号DTO
|
|
// 功能:客服账号的增删改查请求响应结构体
|
|
package dto
|
|
|
|
import (
|
|
"customer-server/consts/account"
|
|
|
|
"gitea.redpowerfuture.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列表"`
|
|
AccountCode string `json:"accountCode" v:"required#账号编码不能为空" dc:"账号编码"`
|
|
AccountName string `json:"accountName" dc:"客服账号名称"`
|
|
Status account.Status `json:"status" dc:"客服账号状态"`
|
|
Greeting string `json:"greeting" dc:"开场白"`
|
|
KeywordOption []string `json:"keywordOption" 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列表"`
|
|
AccountCode string `json:"accountCode" dc:"账号编码"`
|
|
AccountName string `json:"accountName" dc:"客服账号名称"`
|
|
Status account.Status `json:"status" dc:"客服账号状态"`
|
|
Greeting string `json:"greeting" dc:"开场白"`
|
|
KeywordOption []string `json:"keywordOption" 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:"关键字"`
|
|
AccountCode string `json:"accountCode" 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"`
|
|
AccountCode string `json:"accountCode"`
|
|
AccountName string `json:"accountName"`
|
|
Status account.Status `json:"status"`
|
|
Greeting string `json:"greeting"`
|
|
KeywordOption []string `json:"keywordOption"`
|
|
SelfIdentity string `json:"selfIdentity"`
|
|
Platform account.Platform `json:"platform"`
|
|
TenantId uint64 `json:"tenantId"`
|
|
Creator string `json:"creator"`
|
|
CreatedAt string `json:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// GetByAccountCodeReq 根据账号名称获取客服账号
|
|
type GetByAccountCodeReq struct {
|
|
AccountCode string `json:"accountCode" dc:"客服账号"`
|
|
}
|