We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558aea1 commit 6dbe640Copy full SHA for 6dbe640
http/response/data.go
@@ -1,7 +1,5 @@
1
package response
2
3
-import "github.com/infraboard/mcube/http/request"
4
-
5
// Data to be used by controllers.
6
type Data struct {
7
Code *int `json:"code"` // 自定义返回码 0:表示正常
@@ -12,13 +10,6 @@ type Data struct {
12
10
Data interface{} `json:"data,omitempty"` // 返回的具体数据
13
11
}
14
15
-// PageData 数据分页数据
16
-type PageData struct {
17
- *request.PageRequest
18
- TotalCount uint `json:"total"` // 总共多少条
19
- List interface{} `json:"list"` // 页面数据
20
-}
21
22
// NewData new实例
23
func NewData(data interface{}) *Data {
24
code := -1
0 commit comments