Files
gochat/internal/model/common.go
T
2026-06-04 15:44:48 +08:00

18 lines
629 B
Go

package model
// ErrorResponse represents a standard API error response for Swagger documentation.
type ErrorResponse struct {
Error string `json:"error" example:"not_found"`
Message string `json:"message" example:"Resource not found"`
}
// PaginatedResponse represents a paginated list response for Swagger documentation.
type PaginatedResponse struct {
Data interface{} `json:"data"`
Meta struct {
CurrentPage int `json:"current_page" example:"1"`
PerPage int `json:"per_page" example:"25"`
TotalPages int `json:"total_pages" example:"10"`
TotalCount int `json:"total_count" example:"250"`
} `json:"meta"`
}