AlexStocks commented on code in PR #1325:
URL: https://github.com/apache/dubbo-admin/pull/1325#discussion_r2365951336


##########
pkg/console/model/common.go:
##########
@@ -68,51 +70,16 @@ func NewErrorResp(msg string) *CommonResp {
        }
 }
 
-type PageData struct {
-       Total    int `json:"total"`
-       CurPage  int `json:"curPage"`
-       PageSize int `json:"pageSize"`
-       Data     any `json:"data"`
-}
-
-func NewPageData() *PageData {
-       return &PageData{}
-}
-
-func (pd *PageData) WithTotal(total int) *PageData {
-       pd.Total = total
-       return pd
-}
-
-func (pd *PageData) WithCurPage(curPage int) *PageData {
-       pd.CurPage = curPage
-       return pd
-}
-
-func (pd *PageData) WithPageSize(pageSize int) *PageData {
-       pd.PageSize = pageSize
-       return pd
-}
-
-func (pd *PageData) WithData(data any) *PageData {
-       pd.Data = data
-       return pd
-}
-
-type PageReq struct {
-       PageOffset int `form:"pageOffset" json:"pageOffset"`
-       PageSize   int `form:"pageSize" json:"pageSize"`
-}
-
 type SearchReq struct {
        SearchType string `form:"searchType"`
        Keywords   string `form:"keywords"`
-       PageReq
+       Mesh       string `form:"mesh"`
+       coremodel.PageReq

Review Comment:
   这种类似于继承的使用方法,一般把类放在struct开头的位置



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to