mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Initial work on seperation between user and account
This commit is contained in:
46
pkg/models/user.go
Normal file
46
pkg/models/user.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
Id int64
|
||||
Email string
|
||||
Name string
|
||||
Login string
|
||||
Password string
|
||||
Salt string
|
||||
|
||||
IsAdmin bool
|
||||
AccountId int64
|
||||
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
}
|
||||
|
||||
type Account2 struct {
|
||||
Id int64
|
||||
Name string
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
}
|
||||
|
||||
type AccountUser struct {
|
||||
AccountId int64
|
||||
UserId int64
|
||||
Role RoleType
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
}
|
||||
|
||||
// ---------------------
|
||||
// COMMANDS
|
||||
|
||||
type CreateUserCommand struct {
|
||||
Email string
|
||||
Login string
|
||||
Password string
|
||||
Salt string
|
||||
IsAdmin bool
|
||||
|
||||
Result User `json:"-"`
|
||||
}
|
||||
Reference in New Issue
Block a user