保存一下
This commit is contained in:
21
src/core/service/kernel/AService.ts
Normal file
21
src/core/service/kernel/AService.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { serviceManager, type ServiceManager } from '@/core/service/kernel/ServiceManager.ts'
|
||||
|
||||
/**
|
||||
* 服务基类 - 抽象类
|
||||
*/
|
||||
export abstract class AService {
|
||||
private readonly _id: string;
|
||||
private _sm: ServiceManager = serviceManager;
|
||||
|
||||
get id() {
|
||||
return this._id;
|
||||
}
|
||||
get sm() {
|
||||
return this._sm;
|
||||
}
|
||||
|
||||
protected constructor(id: string) {
|
||||
this._id = id;
|
||||
this._sm.registerService(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user