go_dreamfactory/modules/story/module.go
2022-07-05 18:47:01 +08:00

34 lines
693 B
Go

package story
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type Story struct {
modules.ModuleBase
modelStory *ModelStory
api *apiComp
}
func NewModule() core.IModule {
return &Story{}
}
func (this *Story) GetType() core.M_Modules {
return comm.ModuleStory
}
func (this *Story) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
func (this *Story) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelStory = this.RegisterComp(new(ModelStory)).(*ModelStory)
}