Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 26 27 | 9x 9x 9x 9x 14x 1x 1x 1x | import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { ThemeEntity } from 'src/entities/theme.entity';
export class ThemeQueryRepository {
constructor(
@InjectRepository(ThemeEntity)
private repository: Repository<ThemeEntity>,
) {}
async findList(): Promise<ThemeEntity[]> {
return this.repository.find();
}
async findThemeUuid(themeUuid: string): Promise<ThemeEntity> {
return this.repository.findOne({
where: { uuid: themeUuid },
});
}
async findThemeName(themeName: string): Promise<ThemeEntity> {
return this.repository.findOne({
where: { theme_name: themeName },
});
}
}
|