|
@@ -0,0 +1,10 @@
|
|
|
|
|
+import { AppDataSource } from '../data-source';
|
|
|
|
|
+import { GenericCrudService, UserTrackingOptions, RelationFieldOptions } from './generic-crud.service';
|
|
|
|
|
+import { ObjectLiteral } from 'typeorm';
|
|
|
|
|
+
|
|
|
|
|
+// 创建具体CRUD服务类
|
|
|
|
|
+export class ConcreteCrudService<T extends ObjectLiteral> extends GenericCrudService<T> {
|
|
|
|
|
+ constructor(entity: new () => T, options?: { userTracking?: UserTrackingOptions; relationFields?: RelationFieldOptions }) {
|
|
|
|
|
+ super(AppDataSource, entity, options);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|