initial commit

This commit is contained in:
Hafizh A. Y
2025-09-25 10:46:46 +07:00
parent c43544e5e8
commit 10506238ae
64 changed files with 3564 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package response
type Common struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
}
type Success struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
type Meta struct {
Page int `json:"page"`
Limit int `json:"limit"`
TotalPages int64 `json:"total_pages"`
TotalResults int64 `json:"total_results"`
}
type SuccessWithPaginate[T any] struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Meta Meta `json:"meta"`
Data []T `json:"data"`
}
type ErrorDetails struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Errors interface{} `json:"errors"`
}