forked from free-lancers/electricity_bill_calc_service
		
	enhance(user):增加专门用于用户登录的用户缓存设计。
This commit is contained in:
		| @@ -19,3 +19,17 @@ type User struct { | ||||
| func (User) TableName() string { | ||||
| 	return "user" | ||||
| } | ||||
|  | ||||
| type UserWithCredentials 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:"credential"` | ||||
| 	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 (UserWithCredentials) TableName() string { | ||||
| 	return "user" | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user