mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
feat(epic-4): synchro multi-appareils, outils d'admin et optimisations performance
This commit is contained in:
1 parent
dc26f22f51
commit
8777d3b970
10 files changed
+200
-27
No files matched your search
@@ -15,12 +15,20 @@ type User struct {
|
||||
IsAdmin bool `json:"is_admin"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
// UserRepository defines the interface for user data access.
|
||||
const (
|
||||
RoleAdmin = "admin"
|
||||
RoleUser = "user"
|
||||
)
|
||||
|
||||
// UserRepository defines the interface for user persistence.ss.
|
||||
type UserRepository interface {
|
||||
Create(user *User) error
|
||||
GetByEmail(email string) (*User, error)
|
||||
GetByID(id uuid.UUID) (*User, error)
|
||||
Exists(email string) (bool, error)
|
||||
List() ([]*User, error)
|
||||
Delete(id uuid.UUID) error
|
||||
}
|
||||
Reference in new issue
Block a user