Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Injectable } from '@nestjs/common'; |
||
6 | |||
7 | @Injectable() |
||
8 | export class CooperativeRepository implements ICooperativeRepository { |
||
9 | constructor( |
||
10 | @InjectRepository(Cooperative) |
||
11 | private readonly repository: Repository<Cooperative> |
||
12 | ) {} |
||
13 | |||
14 | public find(): Promise<Cooperative> { |
||
15 | return this.repository |
||
16 | .createQueryBuilder('cooperative') |
||
17 | .select([ |
||
18 | 'cooperative.dayDuration' |
||
19 | ]) |
||
20 | .limit(1) |
||
21 | .getOne(); |
||
24 |