36 lines
731 B
Go
36 lines
731 B
Go
package friend
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/modules"
|
|
|
|
"go_dreamfactory/lego/core"
|
|
)
|
|
|
|
func NewModule() core.IModule {
|
|
m := new(Friend)
|
|
return m
|
|
}
|
|
|
|
type Friend struct {
|
|
modules.ModuleBase
|
|
friend_comp *ApiComp
|
|
model_friend *ModelFriend
|
|
}
|
|
|
|
func (this *Friend) GetType() core.M_Modules {
|
|
return comm.SM_FriendModule
|
|
}
|
|
|
|
func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
|
|
return
|
|
}
|
|
|
|
func (this *Friend) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.friend_comp = this.RegisterComp(new(ApiComp)).(*ApiComp)
|
|
this.model_friend = this.RegisterComp(new(ModelFriend)).(*ModelFriend)
|
|
}
|