diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-28 14:26:19 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-28 14:26:19 -0600 |
| commit | e9546b40c8befabda26c1598c124a6ee2a8d2b8f (patch) | |
| tree | c7b09c0c1c821b516e56b5ac3637dc07dc97d039 /app/domain/entity.go | |
| parent | 1de6a34a55c2e8b7d50945984acb45e7809f6a37 (diff) | |
refactor: always provide a user in the request context
Diffstat (limited to 'app/domain/entity.go')
| -rw-r--r-- | app/domain/entity.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/domain/entity.go b/app/domain/entity.go index 0377c51..b2c2166 100644 --- a/app/domain/entity.go +++ b/app/domain/entity.go @@ -1,6 +1,12 @@ package domain +import "github.com/xlgmokha/x/pkg/x" + type Entity interface { Identifiable Validate() error } + +func New[T Entity](options ...x.Configure[T]) T { + return x.New[T](x.Map[x.Configure[T], x.Option[T]](options, x.With[T])...) +} |
