mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Initial commit
This commit is contained in:
14
server/model/response.go
Normal file
14
server/model/response.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
type Response[T any] struct {
|
||||
Success bool `json:"success"`
|
||||
Data T `json:"data,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
type PageResponse[T any] struct {
|
||||
Success bool `json:"success"`
|
||||
TotalPages int `json:"totalPages"`
|
||||
Data []T `json:"data"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
Reference in New Issue
Block a user