Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDTO ¶
type BaseDTO struct {
UUID lang.UUID `json:"uuid"`
CreatedAt lang.Time `json:"created_at"`
UpdatedAt lang.Time `json:"updated_at"`
Creator UserID `json:"creator"`
Owner UserID `json:"owner"`
Updater UserID `json:"updater"`
}
BaseDTO 是通用的基本 DTO 结构
type BaseGetter ¶ added in v0.9.1
type BaseGetter interface {
GetBase() *BaseVO
}
BaseGetter 是获取 BaseVO 的接口
type BaseVO ¶
type BaseVO struct {
Status int `json:"status"`
Message string `json:"message"`
Error string `json:"error"`
Time time.Time `json:"time"`
Timestamp lang.Time `json:"timestamp"`
Pagination *Pagination `json:"pagination"`
}
BaseVO 是通用的基本 VO 结构
type ExampleVO ¶ added in v0.9.2
type ExampleVO struct {
BaseVO
Items []*ExampleDTO `json:"items"`
}
ExampleVO 是一个 VO 的例子
type Pagination ¶
type Pagination struct {
Number int64 `json:"number"` // 页码, first=1
Size int `json:"size"` // 页大小
}
Pagination 是通用的分页参数
Click to show internal directories.
Click to hide internal directories.