This commit is contained in:
2023-11-02 04:34:46 +08:00
commit c4548fe498
369 changed files with 40208 additions and 0 deletions

19
model/cache/user.go vendored Normal file
View 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
}