Add UserList in UI
This commit is contained in:
@@ -2,6 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/deluan/rest"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -22,6 +24,11 @@ type QueryOptions struct {
|
||||
Filters Filters
|
||||
}
|
||||
|
||||
type ResourceRepository interface {
|
||||
rest.Repository
|
||||
rest.Persistable
|
||||
}
|
||||
|
||||
type DataStore interface {
|
||||
Album() AlbumRepository
|
||||
Artist() ArtistRepository
|
||||
@@ -31,5 +38,7 @@ type DataStore interface {
|
||||
Playlist() PlaylistRepository
|
||||
Property() PropertyRepository
|
||||
|
||||
Resource(model interface{}) ResourceRepository
|
||||
|
||||
WithTx(func(tx DataStore) error) error
|
||||
}
|
||||
|
||||
+8
-5
@@ -3,9 +3,12 @@ package model
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
Name string
|
||||
Password string
|
||||
IsAdmin bool
|
||||
CreatedAt time.Time
|
||||
ID string
|
||||
Name string
|
||||
Password string
|
||||
IsAdmin bool
|
||||
LastLoginAt time.Time
|
||||
LastAccessAt time.Time
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user