navidrome/model/user.go

26 lines
520 B
Go
Raw Normal View History

2020-01-15 04:22:34 +01:00
package model
2020-01-14 22:11:27 +01:00
import "time"
type User struct {
2020-01-20 02:40:18 +01:00
ID string
2020-01-20 15:54:29 +01:00
UserName string
2020-01-20 02:40:18 +01:00
Name string
2020-01-20 15:54:29 +01:00
Email string
2020-01-20 02:40:18 +01:00
Password string
IsAdmin bool
2020-01-20 03:39:37 +01:00
LastLoginAt *time.Time
LastAccessAt *time.Time
2020-01-20 02:40:18 +01:00
CreatedAt time.Time
UpdatedAt time.Time
2020-01-14 22:11:27 +01:00
}
type UserRepository interface {
CountAll(...QueryOptions) (int64, error)
Get(id string) (*User, error)
Put(*User) error
2020-01-20 15:54:29 +01:00
FindByUsername(username string) (*User, error)
UpdateLastLoginAt(id string) error
UpdateLastAccessAt(id string) error
}