25 lines
542 B
Go
25 lines
542 B
Go
package home
|
|
|
|
import "SciencesServer/app/session"
|
|
|
|
type Instance struct {
|
|
*session.Enterprise
|
|
tenantID uint64
|
|
}
|
|
|
|
type InstanceHandle func(session *session.Enterprise, tenantID uint64) *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, tenantID uint64) *Instance {
|
|
return &Instance{Enterprise: session, tenantID: tenantID}
|
|
}
|
|
}
|