39 lines
895 B
Go
39 lines
895 B
Go
package dispatch
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
// 默认6条公告数量
|
|
const noticeNum int = 6
|
|
|
|
// 派遣
|
|
type Dispatch struct {
|
|
modules.ModuleBase
|
|
api *apiComp
|
|
configure *configureComp
|
|
modelDispatch *modelDispatch
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &Dispatch{}
|
|
}
|
|
|
|
func (this *Dispatch) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
return
|
|
}
|
|
|
|
func (this *Dispatch) GetType() core.M_Modules {
|
|
return comm.ModuleDispatch
|
|
}
|
|
|
|
func (this *Dispatch) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
this.modelDispatch = this.RegisterComp(new(modelDispatch)).(*modelDispatch)
|
|
}
|