mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 21:59:40 +00:00
feat/working on update card control
This commit is contained in:
@ -34,4 +34,10 @@ export class CardRepository {
|
||||
getCardByReferenceNumber(referenceNumber: string): Promise<Card | null> {
|
||||
return this.cardRepository.findOne({ where: { cardReference: referenceNumber }, relations: ['account'] });
|
||||
}
|
||||
|
||||
getActiveCardForCustomer(customerId: string): Promise<Card | null> {
|
||||
return this.cardRepository.findOne({
|
||||
where: { customerId, status: CardStatus.ACTIVE },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user