feat:完善项目信息
This commit is contained in:
25
app/session/tenant.go
Normal file
25
app/session/tenant.go
Normal file
@ -0,0 +1,25 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"SciencesServer/utils"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Tenant 租户数据信息
|
||||
type Tenant struct {
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Domain string `json:"domain"`
|
||||
}
|
||||
|
||||
func (this *Tenant) MarshalBinary() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
|
||||
func (this *Tenant) UnmarshalBinary(data []byte) error {
|
||||
return utils.FromJSONBytes(data, this)
|
||||
}
|
||||
|
||||
func NewTenant() *Tenant {
|
||||
return &Tenant{}
|
||||
}
|
Reference in New Issue
Block a user