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