package models import ( "time" ) type User struct { Id string `xorm:"not null pk default '' VARCHAR(32)" json:"id"` Account string `xorm:"not null default '' unique VARCHAR(255)" json:"account"` Active bool `xorm:"not null default 0 TINYINT(1)" json:"active"` Alias string `xorm:"not null default '' VARCHAR(255)" json:"alias"` Contact string `xorm:"not null default '' VARCHAR(255)" json:"contact"` Email string `xorm:"not null default '' unique VARCHAR(255)" json:"email"` EmailVerify bool `xorm:"not null default 0 TINYINT(1)" json:"emailVerify"` LastLoginTime time.Time `xorm:"not null index DATETIME(6)" json:"lastLoginTime"` Memo string `xorm:"not null default '' VARCHAR(255)" json:"memo"` Password string `xorm:"not null default '' VARCHAR(255)" json:"-"` RegisterTime time.Time `xorm:"not null index DATETIME(6)" json:"registerTime"` Salt string `xorm:"not null default '' VARCHAR(255)" json:"-"` UserName string `xorm:"not null default '' unique VARCHAR(255)" json:"userName"` } func (m *User) TableName() string { return "user" }