refactor: strengthen domain layer types and add missing page types
- DomainError struct with Code() string method replaces plain errors.New sentinels; errors.Is() still works via pointer equality - UUIDCreatedAt(uuid.UUID) time.Time helper extracts timestamp from UUID v7 - Add TagOffsetPage, CategoryOffsetPage, PoolOffsetPage - FileListParams fields grouped with comments matching openapi.yaml params - Fix mismatched comment on UserPage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,12 +4,12 @@ import "time"
|
||||
|
||||
// User is an application user.
|
||||
type User struct {
|
||||
ID int16
|
||||
Name string
|
||||
Password string // bcrypt hash; only populated when needed for auth
|
||||
IsAdmin bool
|
||||
CanCreate bool
|
||||
IsBlocked bool
|
||||
ID int16
|
||||
Name string
|
||||
Password string // bcrypt hash; only populated when needed for auth
|
||||
IsAdmin bool
|
||||
CanCreate bool
|
||||
IsBlocked bool
|
||||
}
|
||||
|
||||
// Session is an active user session.
|
||||
@@ -24,7 +24,7 @@ type Session struct {
|
||||
IsCurrent bool // true when this session matches the caller's token
|
||||
}
|
||||
|
||||
// OffsetPage is a generic offset-based page of users.
|
||||
// UserPage is an offset-based page of users.
|
||||
type UserPage struct {
|
||||
Items []User
|
||||
Total int
|
||||
|
||||
Reference in New Issue
Block a user