import { HostingConfigBase } from '../HostingConfigBase' ; import { HostingClientBase } from '../HostingClientBase' ; import { Application } from 'egg' ; import { BotLogger , loggerWrapper } from '../../Utils' ; export abstract class ClientServiceBase < TConfig extends HostingConfigBase , TRawClient > { protected app : Application ; protected logger : BotLogger ; protected client : HostingClientBase < TConfig , TRawClient > ; constructor ( app , client , serviceName ) { this . app = app ; this . client = client ; this . logger = loggerWrapper ( app . logger , `[client-${ client . getHostingBase ( ) . getName ( ) }-${ client . getFullName ( ) }-${ serviceName }]` ) ; } public abstract async onStart ( ) ; public abstract async onDispose ( ) ; public abstract async onConfigLoaded ( ) ; public abstract async syncData ( ) ; }