quintodrome/persistence/user_repository.go

21 lines
625 B
Go
Raw Normal View History

2020-01-19 16:40:18 -09:00
package persistence
import (
"time"
"github.com/cloudsonic/sonic-server/model"
)
type user struct {
2020-01-19 17:39:37 -09:00
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)"`
2020-01-19 16:40:18 -09:00
}
var _ = model.User(user{})