2025-04-18 17:17:23 +08:00
|
|
|
|
package dto
|
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
type WebRspData struct {
|
|
|
|
|
Code int `json:"code"`
|
|
|
|
|
Msg string `json:"msg"`
|
|
|
|
|
Data any `json:"data"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-26 13:50:26 +08:00
|
|
|
|
type ResourceInitInfo struct {
|
|
|
|
|
Resource string `json:"resource"`
|
|
|
|
|
Desc string `json:"desc"`
|
|
|
|
|
ShowMethods []string `json:"show_methods"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-27 17:23:19 +08:00
|
|
|
|
type ProjectInitInfo struct {
|
|
|
|
|
ProjectId string `json:"project_id"`
|
|
|
|
|
ProjectName string `json:"project_name"`
|
|
|
|
|
ResourceList []*ResourceInitInfo `json:"resource_list"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-18 17:17:23 +08:00
|
|
|
|
type CommonDtoFieldChoice struct {
|
|
|
|
|
Desc string `json:"desc"`
|
|
|
|
|
Value any `json:"value"`
|
|
|
|
|
// 描述选项的类型,例如添加物品时,可以添加道具、翅膀、宠物等,他们可能不一定都设计为道具
|
|
|
|
|
Type int `json:"type"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CommonDtoFieldDesc struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Key string `json:"key"`
|
|
|
|
|
// 字段类型,基础类型支持int float string bool []<基础类行>,
|
|
|
|
|
// 支持自定义类型和自定义类型的数组
|
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
HelpText string `json:"help_text"`
|
2025-04-24 20:39:31 +08:00
|
|
|
|
Readonly bool `json:"readonly"` // 是否只读,就只展示在表格中
|
|
|
|
|
Required bool `json:"required"` // 是否必填,不能为空
|
2025-04-18 17:17:23 +08:00
|
|
|
|
Choices []*CommonDtoFieldChoice `json:"choices"` // 可选项,用于字段做下拉框
|
|
|
|
|
MultiChoice bool `json:"multi_choice"` // 是否多选
|
2025-04-28 15:56:04 +08:00
|
|
|
|
Uneditable bool `json:"uneditable"` // 不可编辑,某些数据一旦新增之后不能修改,例如封禁的值、服务器的id等
|
2025-04-18 17:17:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-04-18 17:43:08 +08:00
|
|
|
|
//type CommonDtoValue struct {
|
|
|
|
|
// FieldName string `json:"field_name"`
|
|
|
|
|
// Value any `json:"value"`
|
|
|
|
|
//}
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
2025-04-18 17:43:08 +08:00
|
|
|
|
type CommonDtoValues map[string]any
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
|
|
|
|
type CommonDtoList struct {
|
|
|
|
|
FieldsDesc []*CommonDtoFieldDesc `json:"fields_desc"` // 数据字段描述信息
|
2025-04-18 17:43:08 +08:00
|
|
|
|
Rows []CommonDtoValues `json:"rows"` // 数据行
|
2025-04-18 17:17:23 +08:00
|
|
|
|
}
|
2025-04-22 15:46:48 +08:00
|
|
|
|
|
|
|
|
|
type PathInfo struct {
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
Method string `json:"method"`
|
|
|
|
|
}
|