mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
27 lines
705 B
Go
27 lines
705 B
Go
// Package domain contains business logic entities and interfaces.
|
|
package domain
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// User represents a registered user in the system.
|
|
type User struct {
|
|
ID uuid.UUID `json:"id"`
|
|
Email string `json:"email"`
|
|
PasswordHash string `json:"-"` // Never expose in JSON
|
|
IsAdmin bool `json:"is_admin"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// UserRepository defines the interface for user data access.
|
|
type UserRepository interface {
|
|
Create(user *User) error
|
|
GetByEmail(email string) (*User, error)
|
|
GetByID(id uuid.UUID) (*User, error)
|
|
Exists(email string) (bool, error)
|
|
}
|