2026-04-03 17:52:09 +08:00
|
|
|
|
// Package dto - 预制话术DTO
|
|
|
|
|
|
// 功能:预制话术的增删改查请求响应结构体
|
|
|
|
|
|
package dto
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2026-04-11 18:22:52 +08:00
|
|
|
|
"customer-server/consts/scriptedSpeech"
|
|
|
|
|
|
|
2026-04-03 17:52:09 +08:00
|
|
|
|
"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:"创建新的预制话术"`
|
|
|
|
|
|
|
2026-04-11 18:22:52 +08:00
|
|
|
|
DatasetId int64 `json:"datasetId" v:"required#数据集ID不能为空" dc:"数据集ID"`
|
|
|
|
|
|
SceneType scriptedSpeech.SceneType `json:"sceneType" v:"required#场景类型不能为空" dc:"场景类型"`
|
|
|
|
|
|
QuestionContent string `json:"questionContent" v:"required#问题内容不能为空" dc:"问题内容"`
|
2026-04-03 17:52:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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"`
|
|
|
|
|
|
QuestionContent string `json:"questionContent" 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筛选"`
|
|
|
|
|
|
|
2026-04-11 18:22:52 +08:00
|
|
|
|
Page *beans.Page `json:"page"`
|
|
|
|
|
|
DatasetId int64 `json:"datasetId" dc:"数据集ID"`
|
|
|
|
|
|
DatasetIds []int64 `json:"datasetIds" dc:"数据集ID列表"`
|
|
|
|
|
|
SceneType scriptedSpeech.SceneType `json:"sceneType" dc:"场景类型"`
|
2026-04-03 17:52:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ListScriptedSpeechRes struct {
|
|
|
|
|
|
List []*ScriptedSpeechVO `json:"list"`
|
|
|
|
|
|
Total int `json:"total"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ScriptedSpeechVO 预制话术视图对象
|
|
|
|
|
|
type ScriptedSpeechVO struct {
|
2026-04-11 18:22:52 +08:00
|
|
|
|
Id int64 `json:"id,string"`
|
|
|
|
|
|
DatasetId int64 `json:"datasetId,string"`
|
|
|
|
|
|
SceneType scriptedSpeech.SceneType `json:"sceneType"`
|
|
|
|
|
|
QuestionContent string `json:"questionContent"`
|
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
2026-04-03 17:52:09 +08:00
|
|
|
|
}
|