go_dreamfactory/modules/venture/module.go

49 lines
1.0 KiB
Go

package venture
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type Venture struct {
modules.ModuleBase
service core.IService
api *apiComp
configure *configureComp
ModelSign *ModelSign
ModelLv *ModelLv
}
func NewModule() core.IModule {
return &Venture{}
}
func (this *Venture) GetType() core.M_Modules {
return comm.ModuleVenture
}
func (this *Venture) 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 *Venture) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil {
return
}
return
}
func (this *Venture) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.ModelSign = this.RegisterComp(new(ModelSign)).(*ModelSign)
this.ModelLv = this.RegisterComp(new(ModelLv)).(*ModelLv)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}