21 lines
508 B
Go
21 lines
508 B
Go
package proposal
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// SessionUserInfo 当前用户会话信息
|
|
type SessionUserInfo struct {
|
|
Id int32 `json:"id"` // ID
|
|
UserName string `json:"username"` // 用户名
|
|
NickName string `json:"nickname"` // 昵称
|
|
IsSuper int32 `json:"is_super"` // 是否是超级管理员(1:是 0:否)
|
|
Platform string `json:"platform"` // 平台
|
|
}
|
|
|
|
// Marshal 序列化到JSON
|
|
func (user *SessionUserInfo) Marshal() (jsonRaw []byte) {
|
|
jsonRaw, _ = json.Marshal(user)
|
|
return
|
|
}
|