41 lines
988 B
TypeScript
41 lines
988 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;
|
|
/** user's ID */
|
|
userId: string;
|
|
/** user's email */
|
|
userEmail?: string | null;
|
|
/** name of the location */
|
|
name: string;
|
|
/** the value is encoded as yyyymm (i.e. 202301) */
|
|
yearMonth: number;
|
|
/** array of bills */
|
|
bills: Bill[];
|
|
/** (optional) notes */
|
|
notes: string|null;
|
|
};
|
|
|
|
/** Bill basic data */
|
|
export interface Bill {
|
|
_id: string;
|
|
/** bill name */
|
|
name: string;
|
|
/** is the bill paid */
|
|
paid: boolean;
|
|
/** payed amount amount in cents */
|
|
payedAmount?: number | null;
|
|
/** attached document (optional) */
|
|
attachment?: BillAttachment|null;
|
|
/** (optional) notes */
|
|
notes?: string|null;
|
|
}; |