2024-06-13 07:36:02 +00:00
|
|
|
import type { Cloudly } from '../classes.cloudly.js';
|
|
|
|
import * as plugins from '../plugins.js';
|
2024-06-13 08:07:53 +00:00
|
|
|
import { Service } from './classes.service.js';
|
2024-06-13 07:36:02 +00:00
|
|
|
|
|
|
|
export class ServiceManager {
|
|
|
|
public typedrouter = new plugins.typedrequest.TypedRouter();
|
|
|
|
public cloudlyRef: Cloudly;
|
|
|
|
|
|
|
|
get db() {
|
|
|
|
return this.cloudlyRef.mongodbConnector.smartdataDb;
|
|
|
|
}
|
|
|
|
|
|
|
|
public CService = plugins.smartdata.setDefaultManagerForDoc(this, Service);
|
2024-06-13 08:07:53 +00:00
|
|
|
|
|
|
|
constructor(cloudlyRef: Cloudly) {
|
|
|
|
this.cloudlyRef = cloudlyRef;
|
|
|
|
}
|
2024-06-13 07:36:02 +00:00
|
|
|
}
|