Files
36Wisdom/biz/model/dto/scene_node.go
T
2026-08-14 16:11:10 +08:00

90 lines
3.1 KiB
Go

package dto
import "github.com/gogf/gf/v2/frame/g"
// ---------- 后台管理 ----------
type AdminSceneNodeItem struct {
Id int64 `json:"id"`
LevelId int64 `json:"level_id"`
Title string `json:"title"`
CharacterId int64 `json:"character_id"`
CharacterName string `json:"character_name"`
Content string `json:"content"`
Image string `json:"image"`
Audio string `json:"audio"`
NodeType int `json:"node_type"`
InteractionType int `json:"interaction_type"`
Config string `json:"config"`
Script string `json:"script"`
ResultType int `json:"result_type"`
IsEntry int `json:"is_entry"`
SortOrder int `json:"sort_order"`
Status int `json:"status"`
OptionCount int `json:"option_count"`
}
type AdminSceneNodeListReq struct {
g.Meta `path:"/scene-node/list" method:"get" summary:"节点列表(按关卡)"`
LevelId int64 `v:"required|min:1" json:"level_id"`
}
type AdminSceneNodeListRes struct {
List []*AdminSceneNodeItem `json:"list"`
}
type AdminSceneNodeCreateReq struct {
g.Meta `path:"/scene-node/create" method:"post" summary:"新增情境节点"`
LevelId int64 `v:"required|min:1" json:"level_id"`
Title string `json:"title"`
CharacterId int64 `json:"character_id"`
Content string `v:"required" json:"content"`
Image string `json:"image"`
Audio string `json:"audio"`
NodeType int `v:"required|in:1,2" json:"node_type"`
InteractionType int `json:"interaction_type"`
Config string `json:"config"`
Script string `json:"script"`
ResultType int `v:"in:0,1,2,3" json:"result_type"`
IsEntry int `v:"in:0,1" json:"is_entry"`
SortOrder int `json:"sort_order"`
}
type AdminSceneNodeCreateRes struct {
Id int64 `json:"id"`
}
type AdminSceneNodeUpdateReq struct {
g.Meta `path:"/scene-node/update" method:"post" summary:"编辑情境节点"`
Id int64 `v:"required|min:1" json:"id"`
LevelId int64 `v:"required|min:1" json:"level_id"`
Title string `json:"title"`
CharacterId int64 `json:"character_id"`
Content string `v:"required" json:"content"`
Image string `json:"image"`
Audio string `json:"audio"`
NodeType int `v:"required|in:1,2" json:"node_type"`
InteractionType int `json:"interaction_type"`
Config string `json:"config"`
Script string `json:"script"`
ResultType int `v:"in:0,1,2,3" json:"result_type"`
IsEntry int `v:"in:0,1" json:"is_entry"`
SortOrder int `json:"sort_order"`
}
type AdminSceneNodeUpdateRes struct{}
type AdminSceneNodeDisableReq struct {
g.Meta `path:"/scene-node/disable" method:"post" summary:"下架情境节点"`
Id int64 `v:"required|min:1" json:"id"`
}
type AdminSceneNodeDisableRes struct{}
type AdminSceneNodeEnableReq struct {
g.Meta `path:"/scene-node/enable" method:"post" summary:"上架情境节点"`
Id int64 `v:"required|min:1" json:"id"`
}
type AdminSceneNodeEnableRes struct{}