customer/internal/models/common.go
2023-06-22 09:36:43 +00:00

28 lines
505 B
Go

package models
type FastifyError struct {
StatusCode int `json:"statusCode"`
Error string `json:"error"`
Message string `json:"message"`
}
type ResponseErrorHTTP struct {
StatusCode int `json:"statusCode"`
Message string `json:"message"`
}
type PaginationResponse[T any] struct {
TotalPages int64 `json:"totalPages"`
Records []T `json:"records"`
}
type Pagination struct {
Page int64
Limit int64
}
const (
DefaultPageNumber int64 = 1
DefaultLimit int64 = 100
)