diff --git a/app/lib/db-types.ts b/app/lib/db-types.ts index e0f926c..341ed62 100644 --- a/app/lib/db-types.ts +++ b/app/lib/db-types.ts @@ -1,12 +1,11 @@ -import { ObjectId } from "mongodb"; -import { inter } from "../ui/fonts"; -export interface BillAttachment { +export interface FileAttachment { fileName: string; fileSize: number; fileType: string; fileLastModified: number; fileContentsBase64: string; + uploadedAt: Date; }; export interface YearMonth { @@ -79,9 +78,9 @@ export interface BillingLocation { /** (optional) whether the location has been seen by tenant */ seenByTenantAt?: Date | null; /** (optional) utility bills proof of payment attachment */ - utilBillsProofOfPaymentAttachment?: BillAttachment|null; - /** (optional) date when utility bills proof of payment was uploaded */ - utilBillsProofOfPaymentUploadedAt?: Date|null; + utilBillsProofOfPayment?: FileAttachment|null; + /** (optional) rent proof of payment attachment */ + rentProofOfPayment?: FileAttachment|null; }; export enum BilledTo { @@ -101,7 +100,7 @@ export interface Bill { /** payed amount amount in cents */ payedAmount?: number | null; /** attached document (optional) */ - attachment?: BillAttachment|null; + attachment?: FileAttachment|null; /** * true if there an attachment * @description this field enables us to send this info to the client without sending large attachment - it's an optimization @@ -116,4 +115,6 @@ export interface Bill { barcodeImage?:string; /** (optional) HUB-3A text for generating PDF417 bar code */ hub3aText?:string; + /** (optional) proof of payment attachment */ + proofOfPayment?: FileAttachment|null; }; \ No newline at end of file