39 lines
886 B
Go
39 lines
886 B
Go
package moonlv
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
type Moonlv struct {
|
|
modules.ModuleBase
|
|
api *apiComp
|
|
configure *configureComp
|
|
modelMoonlv *modelMoonlv
|
|
service core.IService
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &Moonlv{}
|
|
}
|
|
|
|
func (this *Moonlv) GetType() core.M_Modules {
|
|
return comm.ModuleMoonlv
|
|
}
|
|
|
|
func (this *Moonlv) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
if err = this.ModuleBase.Init(service, module, options); err != nil {
|
|
return
|
|
}
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *Moonlv) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
this.modelMoonlv = this.RegisterComp(new(modelMoonlv)).(*modelMoonlv)
|
|
}
|