forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.module.ts
More file actions
25 lines (24 loc) · 831 Bytes
/
Copy pathsearch.module.ts
File metadata and controls
25 lines (24 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SearchController } from './search.controller';
import { SearchService } from './search.service';
import { Split } from '../entities/split.entity';
import { Item } from '../entities/item.entity';
import { Participant } from '../entities/participant.entity';
/**
* Search module providing full-text search capabilities
*
* I'm injecting the repositories we need for searching:
* - Split: main entity being searched
* - Item: for searching item names within splits
* - Participant: for filtering by participants
*/
@Module({
imports: [
TypeOrmModule.forFeature([Split, Item, Participant]),
],
controllers: [SearchController],
providers: [SearchService],
exports: [SearchService],
})
export class SearchModule {}