go_dreamfactory/modules/user/module.go
2022-06-07 17:18:34 +08:00

36 lines
712 B
Go

package user
import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"github.com/liwei1dao/lego/core"
)
func NewModule() core.IModule {
m := new(User)
return m
}
type User struct {
modules.ModuleBase
login_comp *LoginComp
user_comp *UserComp
}
func (this *User) GetType() core.M_Modules {
return comm.SM_UserModule
}
func (this *User) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
func (this *User) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.login_comp = this.RegisterComp(new(LoginComp)).(*LoginComp)
this.user_comp = this.RegisterComp(new(UserComp)).(*UserComp)
}