Реализация на 4

This commit is contained in:
Grbisba
2026-11-05 14:24:40 +03:00
parent 20f2f00a60
commit 8d44c74535
85 changed files with 3601 additions and 1109 deletions
+17 -1
View File
@@ -1,9 +1,25 @@
package dto
import "github.com/google/uuid"
import (
"time"
"github.com/google/uuid"
)
// Page is a page of records with the ID to use for the next page.
type Page[T any] struct {
Items []T
NextCursorID *uuid.UUID
}
// PagePosition is a resolved database cursor, ordered by creation time and ID.
type PagePosition struct {
CreatedAt time.Time
ID uuid.UUID
}
// PageQuery is prepared by a service; Limit includes the lookahead row.
type PageQuery struct {
Limit int
After *PagePosition
}