Initial work on seperation between user and account

This commit is contained in:
Torkel Ödegaard
2015-01-19 16:28:45 +01:00
parent d8e5be5782
commit f1996a9f1f
8 changed files with 212 additions and 4 deletions

46
pkg/models/user.go Normal file
View 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:"-"`
}