31 lines
541 B
Go
31 lines
541 B
Go
package models
|
|
|
|
type Pagination struct {
|
|
Page int `json:"page"`
|
|
Limit int `json:"limit"`
|
|
Total int64 `json:"total_count"`
|
|
TotalPages int `json:"total_pages"`
|
|
}
|
|
|
|
type PaginatedResponse[T any] struct {
|
|
Data []T `json:"data"`
|
|
Pagination Pagination `json:"pagination"`
|
|
}
|
|
|
|
func GetAllModelNames() []string {
|
|
return []string{
|
|
"Organization",
|
|
"Outlet",
|
|
"User",
|
|
"Category",
|
|
"Product",
|
|
"ProductVariant",
|
|
"Inventory",
|
|
"Order",
|
|
"OrderItem",
|
|
"PaymentMethod",
|
|
"Payment",
|
|
"Customer",
|
|
}
|
|
}
|