✨ Init
This commit is contained in:
19
model/cache/user.go
vendored
Normal file
19
model/cache/user.go
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package cache
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// UserInfo 登录用的用户信息结构体
|
||||
type UserInfo struct {
|
||||
UserType string `json:"userType"` // 用户类型
|
||||
RoleCodes string `json:"roleCodes"` // 角色代码
|
||||
UserId string `json:"userId"` // 用户Id
|
||||
}
|
||||
|
||||
// String 实现Stringer接口
|
||||
func (i UserInfo) String() (string, error) {
|
||||
b, err := json.Marshal(i)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(b), nil
|
||||
}
|
Reference in New Issue
Block a user