package user import ( "go_dreamfactory/comm" "go_dreamfactory/modules" "go_dreamfactory/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) }