package treasuremap import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" ) func NewModule() core.IModule { m := new(TreasureMap) return m } /* 模块名称:猜颜色 */ type TreasureMap struct { modules.ModuleBase service comm.IService api *apiComp configure *configureComp model *modelComp } // 模块名 func (this *TreasureMap) GetType() core.M_Modules { return comm.ModuleTreasureMap } // 模块初始化接口 注册用户创建角色事件 func (this *TreasureMap) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) this.service = service.(comm.IService) return } func (this *TreasureMap) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.model = this.RegisterComp(new(modelComp)).(*modelComp) }