package pay import ( "yunyan/comm" "yunyan/modules" "yunyan/lego/core" ) func NewModule() core.IModule { m := new(Pay) return m } type Pay struct { modules.ModuleBase api *apiComp model *modelComp options *Options analyze comm.IAnalyze } func (this *Pay) GetType() core.M_Modules { return comm.ModulePay } func (this *Pay) NewOptions() (options core.IModuleOptions) { return new(Options) } func (this *Pay) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { this.options = options.(*Options) if err = this.ModuleBase.Init(service, module, options); err != nil { return } return } func (this *Pay) Start() (err error) { if err = this.ModuleBase.Start(); err != nil { return } return } func (this *Pay) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.model = this.RegisterComp(new(modelComp)).(*modelComp) }