feat:完善项目信息

This commit is contained in:
henry
2022-01-05 11:29:27 +08:00
parent d8ca61a449
commit 822ced6041
88 changed files with 375 additions and 308 deletions

35
app/session/admin.go Normal file
View File

@ -0,0 +1,35 @@
package session
import (
"SciencesServer/utils"
"encoding/json"
)
type Admin struct {
UID uint64 `json:"uid"` // 唯一标识ID
TenantID uint64 `json:"tenant_id"` // 租户ID
Token string `json:"token"` // token
Name string `json:"name"` // 名称
Mobile string `json:"mobile"` // 手机号码
IsAdmin bool `json:"is_admin"` // 是否超管
}
func (this *Admin) SetToken(token string) {
this.Token = token
}
func (this *Admin) GetToken() string {
return this.GetToken()
}
func (this *Admin) MarshalBinary() ([]byte, error) {
return json.Marshal(this)
}
func (this *Admin) UnmarshalBinary(data []byte) error {
return utils.FromJSONBytes(data, this)
}
func NewAdmin() *Admin {
return &Admin{}
}

View File

@ -1,34 +0,0 @@
package session
import (
"SciencesServer/utils"
"encoding/json"
)
type Manage struct {
UID uint64 `json:"uid"` // 唯一标识ID
Token string `json:"token"` // token
Name string `json:"name"` // 名称
Mobile string `json:"mobile"` // 手机号码
IsAdmin bool `json:"is_admin"` // 是否超管
}
func (this *Manage) SetToken(token string) {
this.Token = token
}
func (this *Manage) GetToken() string {
return this.GetToken()
}
func (this *Manage) MarshalBinary() ([]byte, error) {
return json.Marshal(this)
}
func (this *Manage) UnmarshalBinary(data []byte) error {
return utils.FromJSONBytes(data, this)
}
func NewManage() *Manage {
return &Manage{}
}