Files
customer-server/model/dto/scripted_speech_dto.go

71 lines
2.9 KiB
Go
Raw Normal View History

// Package dto - 预制话术DTO
// 功能:预制话术的增删改查请求响应结构体
package dto
import (
"customer-server/consts/scriptedSpeech"
2026-06-10 15:51:41 +08:00
"gitea.redpowerfuture.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:"创建新的预制话术"`
DatasetId int64 `json:"datasetId" v:"required#数据集ID不能为空" dc:"数据集ID"`
SceneType scriptedSpeech.SceneType `json:"sceneType" v:"required#场景类型不能为空" dc:"场景类型"`
QuestionContent string `json:"questionContent" 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"`
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筛选"`
Page *beans.Page `json:"page"`
DatasetId int64 `json:"datasetId" dc:"数据集ID"`
DatasetIds []int64 `json:"datasetIds" dc:"数据集ID列表"`
SceneType scriptedSpeech.SceneType `json:"sceneType" dc:"场景类型"`
}
type ListScriptedSpeechRes struct {
List []*ScriptedSpeechVO `json:"list"`
Total int `json:"total"`
}
// ScriptedSpeechVO 预制话术视图对象
type ScriptedSpeechVO struct {
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"`
}