Second checkpoint

This commit is contained in:
2026-06-25 01:17:42 +05:00
parent 854ef138d0
commit 9cf791b789
90 changed files with 5504 additions and 988 deletions

16
internal/domain/errors.go Normal file
View File

@@ -0,0 +1,16 @@
// Package domain holds the core entities, enums, and sentinel errors shared by
// every layer. It has no dependencies on other internal packages.
package domain
import "errors"
var (
// ErrNotFound is returned when a requested entity does not exist.
ErrNotFound = errors.New("not found")
// ErrConflict is returned when an operation violates a constraint, e.g. a
// foreign-key reference or a uniqueness rule.
ErrConflict = errors.New("conflict")
// ErrValidation is returned when input fails a business rule (as opposed to
// request-shape validation, which the transport layer handles).
ErrValidation = errors.New("validation failed")
)