customer/internal/models/common.go

28 lines
505 B
Go
Raw Normal View History

2023-05-16 01:12:07 +00:00
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"`
}
2023-05-17 20:27:09 +00:00
type Pagination struct {
Page int64
Limit int64
}
2023-05-16 01:12:07 +00:00
const (
2023-05-17 20:27:09 +00:00
DefaultPageNumber int64 = 1
DefaultLimit int64 = 100
2023-05-16 01:12:07 +00:00
)