omada-api/model/response.go
2025-02-01 17:38:29 +01:00

16 lines
395 B
Go

package model
type Response[T any] struct {
ErrorCode int `json:"errorCode"`
Message string `json:"msg"`
Result T `json:"result"`
}
type PagedResponse[T any] Response[PagedResponseResult[T]]
type PagedResponseResult[T any] struct {
TotalRows int `json:"totalRows"`
CurrentPage int `json:"currentPage"`
CurrentSize int `json:"currentSize"`
Data []T `json:"data"`
}