refactor(core): Use injectable classes for db repositories (part-1) (no-changelog) (#5953)
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
committed by
GitHub
parent
323e26acfd
commit
10f8c35dbb
@@ -0,0 +1,10 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from 'typeorm';
|
||||
import { WorkflowEntity } from '../entities/WorkflowEntity';
|
||||
|
||||
@Service()
|
||||
export class WorkflowRepository extends Repository<WorkflowEntity> {
|
||||
constructor(dataSource: DataSource) {
|
||||
super(WorkflowEntity, dataSource.manager);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user