feat:增加用户资产和会员状态
This commit is contained in:
24
app/api/enterprise/controller/home/instance.go
Normal file
24
app/api/enterprise/controller/home/instance.go
Normal file
@ -0,0 +1,24 @@
|
||||
package home
|
||||
|
||||
import "SciencesServer/app/session"
|
||||
|
||||
type Instance struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type InstanceHandle func(session *session.Enterprise, local string) *Instance
|
||||
|
||||
type InstanceInfo struct {
|
||||
Currency float64 `json:"currency"`
|
||||
}
|
||||
|
||||
func (c *Instance) Instance() (*InstanceInfo, error) {
|
||||
return &InstanceInfo{Currency: c.Currency}, nil
|
||||
}
|
||||
|
||||
func NewInstance() InstanceHandle {
|
||||
return func(session *session.Enterprise, local string) *Instance {
|
||||
return &Instance{Enterprise: session, local: local}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user