mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
22 lines
352 B
Go
22 lines
352 B
Go
package model
|
|
|
|
type Result[T any] struct {
|
|
Rows []*T `json:"rows"`
|
|
HasNextPage bool `json:"hasNextPage"`
|
|
}
|
|
|
|
func NewResult[T any](rows []*T) *Result[T] {
|
|
return &Result[T]{
|
|
Rows: rows,
|
|
HasNextPage: false,
|
|
}
|
|
}
|
|
|
|
func NewEmptyResult[T any]() *Result[T] {
|
|
t := []*T{}
|
|
return &Result[T]{
|
|
Rows: t,
|
|
HasNextPage: false,
|
|
}
|
|
}
|