feat: 添加客服账号管理及WebSocket功能
This commit is contained in:
73
model/dto/scripted_speech_dto.go
Normal file
73
model/dto/scripted_speech_dto.go
Normal file
@@ -0,0 +1,73 @@
|
||||
// Package dto - 预制话术DTO
|
||||
// 功能:预制话术的增删改查请求响应结构体
|
||||
package dto
|
||||
|
||||
import (
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddScriptedSpeechReq 添加预制话术
|
||||
type AddScriptedSpeechReq struct {
|
||||
g.Meta `path:"/add" method:"post" tags:"预制话术管理" summary:"添加预制话术" dc:"创建新的预制话术"`
|
||||
|
||||
AccountId int64 `json:"accountId" v:"required#账号ID不能为空" dc:"账号ID"`
|
||||
DatasetId int64 `json:"datasetId" v:"required#数据集ID不能为空" dc:"数据集ID"`
|
||||
QuestionContent string `json:"questionContent" v:"required#问题内容不能为空" dc:"问题内容"`
|
||||
AnswerContent string `json:"answerContent" v:"required#回答内容不能为空" dc:"回答内容"`
|
||||
}
|
||||
|
||||
type AddScriptedSpeechRes struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateScriptedSpeechReq 更新预制话术
|
||||
type UpdateScriptedSpeechReq struct {
|
||||
g.Meta `path:"/update" method:"post" tags:"预制话术管理" summary:"更新预制话术" dc:"更新预制话术内容"`
|
||||
|
||||
Id int64 `json:"id" v:"required#预制话术ID不能为空" dc:"预制话术ID"`
|
||||
AccountId *int64 `json:"accountId" dc:"账号ID"`
|
||||
DatasetId *int64 `json:"datasetId" dc:"数据集ID"`
|
||||
QuestionContent string `json:"questionContent" dc:"问题内容"`
|
||||
AnswerContent string `json:"answerContent" dc:"回答内容"`
|
||||
}
|
||||
|
||||
// DeleteScriptedSpeechReq 删除预制话术
|
||||
type DeleteScriptedSpeechReq struct {
|
||||
g.Meta `path:"/delete" method:"post" tags:"预制话术管理" summary:"删除预制话术" dc:"删除指定预制话术"`
|
||||
|
||||
Id int64 `json:"id" v:"required#预制话术ID不能为空" dc:"预制话术ID"`
|
||||
}
|
||||
|
||||
// GetScriptedSpeechReq 获取单个预制话术
|
||||
type GetScriptedSpeechReq struct {
|
||||
g.Meta `path:"/getOne" method:"get" tags:"预制话术管理" summary:"获取预制话术详情" dc:"根据ID获取单个预制话术"`
|
||||
|
||||
Id int64 `json:"id" v:"required#预制话术ID不能为空" dc:"预制话术ID"`
|
||||
}
|
||||
|
||||
// ListScriptedSpeechReq 获取预制话术列表
|
||||
type ListScriptedSpeechReq struct {
|
||||
g.Meta `path:"/list" method:"get" tags:"预制话术管理" summary:"获取预制话术列表" dc:"分页查询预制话术,支持按账号ID、数据集ID筛选"`
|
||||
|
||||
Page *beans.Page `json:"page"`
|
||||
AccountId int64 `json:"accountId" dc:"账号ID"`
|
||||
DatasetId int64 `json:"datasetId" dc:"数据集ID"`
|
||||
}
|
||||
|
||||
type ListScriptedSpeechRes struct {
|
||||
List []*ScriptedSpeechVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// ScriptedSpeechVO 预制话术视图对象
|
||||
type ScriptedSpeechVO struct {
|
||||
Id int64 `json:"id,string"`
|
||||
TenantId uint64 `json:"tenantId,string"`
|
||||
AccountId int64 `json:"accountId,string"`
|
||||
DatasetId int64 `json:"datasetId,string"`
|
||||
QuestionContent string `json:"questionContent"`
|
||||
AnswerContent string `json:"answerContent"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
}
|
||||
Reference in New Issue
Block a user