43 lines
951 B
Go
43 lines
951 B
Go
package notify
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
/*
|
|
模块名:公告系统
|
|
是否跨服:是
|
|
描述:提供运营后台发布全服公告
|
|
开发:李伟
|
|
*/
|
|
func NewModule() core.IModule {
|
|
m := new(Notification)
|
|
return m
|
|
}
|
|
|
|
type Notification struct {
|
|
modules.ModuleBase
|
|
api_comp *apiComp
|
|
modelNotify *modelNotifyComp
|
|
}
|
|
|
|
//模块名
|
|
func (this *Notification) GetType() core.M_Modules {
|
|
return comm.ModuleEquipment
|
|
}
|
|
|
|
//模块初始化接口 注册用户创建角色事件
|
|
func (this *Notification) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
return
|
|
}
|
|
|
|
//装备组件
|
|
func (this *Notification) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.modelNotify = this.RegisterComp(new(modelNotifyComp)).(*modelNotifyComp)
|
|
}
|