mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 21:59:40 +00:00
feat: add vpan to card entity
This commit is contained in:
@ -22,6 +22,7 @@ export class CardRepository {
|
||||
scheme: CardScheme.VISA,
|
||||
issuer: CardIssuers.NEOLEAP,
|
||||
accountId: accountId,
|
||||
vpan: card.vpan,
|
||||
}),
|
||||
);
|
||||
}
|
||||
@ -34,9 +35,9 @@ export class CardRepository {
|
||||
return this.cardRepository.findOne({ where: { cardReference: referenceNumber }, relations: ['account'] });
|
||||
}
|
||||
|
||||
getCardByAccountNumber(accountNumber: string): Promise<Card | null> {
|
||||
getCardByVpan(vpan: string): Promise<Card | null> {
|
||||
return this.cardRepository.findOne({
|
||||
where: { account: { accountNumber } },
|
||||
where: { vpan },
|
||||
relations: ['account'],
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user