Complete User CRUD
This commit is contained in:
@@ -7,14 +7,14 @@ import (
|
||||
)
|
||||
|
||||
type user struct {
|
||||
ID string `json:"id" orm:"pk;column(id)"`
|
||||
Name string `json:"name" orm:"index"`
|
||||
Password string `json:"-"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
LastLoginAt time.Time `json:"lastLoginAt"`
|
||||
LastAccessAt time.Time `json:"lastAccessAt"`
|
||||
CreatedAt time.Time `json:"createdAt" orm:"auto_now_add;type(datetime)"`
|
||||
UpdatedAt time.Time `json:"updatedAt" orm:"auto_now;type(datetime)"`
|
||||
ID string `json:"id" orm:"pk;column(id)"`
|
||||
Name string `json:"name" orm:"index"`
|
||||
Password string `json:"-"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
LastLoginAt *time.Time `json:"lastLoginAt" orm:"null"`
|
||||
LastAccessAt *time.Time `json:"lastAccessAt" orm:"null"`
|
||||
CreatedAt time.Time `json:"createdAt" orm:"auto_now_add;type(datetime)"`
|
||||
UpdatedAt time.Time `json:"updatedAt" orm:"auto_now;type(datetime)"`
|
||||
}
|
||||
|
||||
var _ = model.User(user{})
|
||||
|
||||
Reference in New Issue
Block a user