feat:完善信息
This commit is contained in:
@ -26,3 +26,24 @@ func (this *Session) UnmarshalBinary(data []byte) error {
|
||||
func NewSession() *Session {
|
||||
return &Session{}
|
||||
}
|
||||
|
||||
// SessionEnterprise 企业用户
|
||||
type SessionEnterprise struct {
|
||||
UID uint64 `json:"uid"` // 唯一标识ID
|
||||
Token string `json:"token"` // token
|
||||
Name string `json:"name"` // 名称
|
||||
Mobile string `json:"mobile"` // 手机号码
|
||||
Identity int `json:"identity"` // 身份信息
|
||||
}
|
||||
|
||||
func (this *SessionEnterprise) MarshalBinary() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
|
||||
func (this *SessionEnterprise) UnmarshalBinary(data []byte) error {
|
||||
return utils.FromJSONBytes(data, this)
|
||||
}
|
||||
|
||||
func NewSessionEnterprise() *SessionEnterprise {
|
||||
return &SessionEnterprise{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user