import type {DocumentReference, Timestamp} from '@google-cloud/firestore'; import {UserModel} from '../user'; export enum CardStatus { PENDING = 'PENDING', // card order has been saved, however we are just pending kyc ORDERED = 'ORDERED', // once kyc has been approved the card should be ordered and sent for delivery ACTIVATED = 'ACTIVATED', // the card has been received in the mail and activated } export enum CardMaterial { PLASTIC = 'PLASTIC', METAL = 'METAL', } export enum CardType { PREPAID = 'PREPAID', DEBIT = 'DEBIT', } export enum CardProvider { CODEGO = 'CODEGO', } export interface Card { id: string; provider: CardProvider; cardId: string | null; cardNumber: string | null; cardImage: string | null; expiryDate: string | null; user: string; isLocked: boolean; material: CardMaterial; type: CardType; status: CardStatus; createdAt: number; updatedAt: number; } export interface CardModel { provider: CardProvider; cardId: string | null; cardNumber: string | null; cardImage: string | null; expiryDate: string | null; user: DocumentReference; isLocked: boolean; material: CardMaterial; type: CardType; status: CardStatus; createdAt: Timestamp; updatedAt: Timestamp; }