cbe51b9343
- Added BankAccountsController, BankAccountsService, and related DTOs for managing bank accounts. - Implemented BankBranchesController, BankBranchesService, and related DTOs for managing bank branches. - Created BanksController and BanksService for retrieving bank information. - Integrated Prisma for database operations across all modules. - Added response mapping for consistent API responses.
16 lines
447 B
TypeScript
16 lines
447 B
TypeScript
import { Injectable } from '@nestjs/common'
|
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
|
import { PrismaService } from '../../prisma/prisma.service'
|
|
|
|
@Injectable()
|
|
export class BanksService {
|
|
constructor(private prisma: PrismaService) {}
|
|
|
|
async findAll() {
|
|
const items = await this.prisma.bank.findMany({
|
|
select: { id: true, name: true, shortName: true },
|
|
})
|
|
return ResponseMapper.list(items)
|
|
}
|
|
}
|