22 lines
554 B
Go
22 lines
554 B
Go
package model
|
|
|
|
const (
|
|
USER_TYPE_ENT int8 = iota
|
|
USER_TYPE_SUP
|
|
USER_TYPE_OPS
|
|
)
|
|
|
|
type User struct {
|
|
Created `xorm:"extends"`
|
|
Id string `xorm:"varchar(120) pk not null" json:"id"`
|
|
Username string `xorm:"varchar(30) not null" json:"username"`
|
|
Password string `xorm:"varchar(256) not null" json:"-"`
|
|
ResetNeeded bool `xorm:"bool not null" json:"resetNeeded"`
|
|
Type int8 `xorm:"smallint not null" json:"type"`
|
|
Enabled bool `xorm:"bool not null" json:"enabled"`
|
|
}
|
|
|
|
func (User) TableName() string {
|
|
return "user"
|
|
}
|