Files
evidencija-rezija/app/lib/db-types.ts
2024-01-08 16:32:08 +01:00

30 lines
667 B
TypeScript

import { ObjectId } from "mongodb";
export interface BillAttachment {
fileName: string;
fileSize: number;
fileType: string;
fileLastModified: number;
fileContentsBase64: string;
};
/** bill object in the form returned by MongoDB */
export interface BillingLocation {
_id: string;
userId: string;
userEmail?: string | null;
name: string;
/** the value is encoded as yyyymm (i.e. 202301) */
yearMonth: number;
bills: Bill[];
notes: string|null;
};
/** Bill basic data */
export interface Bill {
_id: string;
name: string;
paid: boolean;
attachment?: BillAttachment|null;
notes?: string|null;
};