Skip to content

Commit

Permalink
chore: add lesson module
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyễn Nhật Long committed May 28, 2024
1 parent 9f570a8 commit ff21431
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/lesson/PostModule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {getModuleContainer, module} from 'inversify-sugar';
import {GetPostsStore} from './presentation/stores/GetPostsStore/GetPostsStore';
import {FindPostStore} from './presentation/stores/FindPostStore/FindPostStore';
import {IPostRepositoryToken} from './domain/specifications/IPostRepository';
import PostRepository from './infrastructure/implementations/PostRepository';
import FindPostUseCase from './application/useCases/FindPostUseCase';
import GetPostsUseCase from './application/useCases/GetPostsUseCase';

@module({
providers: [
{
provide: IPostRepositoryToken,
useClass: PostRepository,
},
FindPostUseCase,
GetPostsUseCase,
{
useClass: GetPostsStore,
scope: 'Transient',
},
{
useClass: FindPostStore,
scope: 'Transient',
},
],
})
export class PostModule {}

export const postModuleContainer = getModuleContainer(PostModule);

0 comments on commit ff21431

Please sign in to comment.