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:
@@ -17,5 +17,13 @@ type Category struct {
|
||||
CreatorID int16
|
||||
CreatorName string // denormalized
|
||||
IsPublic bool
|
||||
CreatedAt time.Time // extracted from UUID v7
|
||||
CreatedAt time.Time // extracted from UUID v7 via UUIDCreatedAt
|
||||
}
|
||||
|
||||
// CategoryOffsetPage is an offset-based page of categories.
|
||||
type CategoryOffsetPage struct {
|
||||
Items []Category
|
||||
Total int
|
||||
Offset int
|
||||
Limit int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user