142 lines
5.3 KiB
Go
Raw Normal View History

2025-04-18 17:17:23 +08:00
package dto
2025-04-24 20:39:31 +08:00
type WebRspData struct {
2025-05-08 15:48:34 +08:00
Code int `json:"code"`
Msg string `json:"msg"`
DetailMsg string `json:"detail_msg"`
Data any `json:"data"`
2025-04-24 20:39:31 +08:00
}
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-06-09 16:44:42 +08:00
BigColumn bool `json:"big_column"` // 大列,表示内容很长,需要省略
2025-05-04 22:07:13 +08:00
Where string `json:"where"` // sql list的where条件用于表格页面查询条件编写eq gt lt ge lt range like
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-05-09 18:28:15 +08:00
TotalCount int `json:"total_count"`
2025-05-15 17:30:33 +08:00
Rows []CommonDtoValues `json:"rows"` // 数据行
ItemBags []*ItemBagInfo `json:"item_bags"` // 礼包,用来给道具添加功能选择用
2025-04-18 17:17:23 +08:00
}
2025-04-22 15:46:48 +08:00
2025-05-16 15:17:10 +08:00
type ResourceInitInfo struct {
Resource string `json:"resource"`
Desc string `json:"desc"`
ShowMethods []string `json:"show_methods"`
}
2025-04-22 15:46:48 +08:00
type PathInfo struct {
Path string `json:"path"`
Method string `json:"method"`
}
2025-05-04 22:07:13 +08:00
type GetWhereCondition struct {
Key string `json:"key"`
Op string `json:"op"` // eq,gt,lt,range
Value1 any `json:"value1"`
Value2 any `json:"value2"`
}
2025-05-08 15:48:34 +08:00
type ItemInfo struct {
ItemID int `json:"item_id"`
ItemNum int64 `json:"item_num"`
ItemType int `json:"item_type"`
Desc string `json:"desc"`
}
2025-05-13 18:13:22 +08:00
2025-05-15 17:30:33 +08:00
type ItemBagInfo struct {
Name string `json:"name"`
Items []*ItemInfo `json:"items"`
}
2025-05-13 18:13:22 +08:00
type AccountDetailOrderInfo struct {
ServerId string `json:"server_id"`
AccountId string `json:"account_id"`
RoleId string `json:"role_id"`
RoleName string `json:"role_name"`
Sn string `json:"sn"`
ProductId string `json:"product_id"`
Price int `json:"price"`
PurchaseType string `json:"purchase_type"`
PurchaseAt string `json:"purchase_at"`
}
type AccountDetailRoleInfo struct {
Platform string `json:"platform"` // ios ad
ServerId string `json:"server_id"`
Name string `json:"name"`
RoleId string `json:"role_id"`
TotalPayAmount int `json:"total_pay_amount"`
TotalPayTimes int `json:"total_pay_times"`
Level int `json:"level"`
CurrencyItems []*ItemInfo `json:"currency_items"`
CreatedAt string `json:"created_at"`
LastLoginTime string `json:"last_login_time"`
OrderList []*AccountDetailOrderInfo `json:"order_list"`
}
type AccountDetailInfo struct {
AccountId string `json:"account_id"`
Platform string `json:"platform"` // ios ad
RoleCount int `json:"role_count"`
Channel string `json:"channel"`
CreatedAt string `json:"created_at"`
CreatedIp string `json:"created_ip"`
TotalPayAmount int `json:"total_pay_amount"`
TotalPayTimes int `json:"total_pay_times"`
FirstPayAt string `json:"first_pay_at"`
LastPayAt string `json:"last_pay_at"`
LoginDeviceCount int `json:"login_device_count"`
LastLoginTime string `json:"last_login_time"`
RoleList []*AccountDetailRoleInfo `json:"role_list"`
}
2025-05-16 15:17:10 +08:00
type UserInfo struct {
UserId int `json:"user_id"`
NickName string `json:"nick_name"`
Icon string `json:"icon"`
Character string `json:"character"`
Permissions []string `json:"permissions"`
}
type TokenInfo struct {
Token string `json:"token"`
ExpireAt int64 `json:"expire_at"`
}
2025-05-19 17:51:09 +08:00
type UserOpHistoryInfo struct {
UserId int `json:"userId"`
UserName string `json:"userName"`
OpResourceType string `json:"opResourceType"`
OpResourceGroup string `json:"opResourceGroup"`
OpResourceKey string `json:"opResourceKey"`
Method string `json:"method"`
CreatedAt string `json:"createdAt"`
DetailInfo string `json:"detailInfo"`
}