refactor: standardize quotation marks across all files and improve code consistency
This commit is contained in:
98
lib/types.ts
98
lib/types.ts
@@ -1,72 +1,72 @@
|
||||
// Types for the banking management application
|
||||
|
||||
export interface Transaction {
|
||||
id: string
|
||||
accountId: string
|
||||
date: string
|
||||
amount: number
|
||||
description: string
|
||||
type: "DEBIT" | "CREDIT"
|
||||
categoryId: string | null
|
||||
isReconciled: boolean
|
||||
fitId: string // OFX unique transaction ID
|
||||
memo?: string
|
||||
checkNum?: string
|
||||
id: string;
|
||||
accountId: string;
|
||||
date: string;
|
||||
amount: number;
|
||||
description: string;
|
||||
type: "DEBIT" | "CREDIT";
|
||||
categoryId: string | null;
|
||||
isReconciled: boolean;
|
||||
fitId: string; // OFX unique transaction ID
|
||||
memo?: string;
|
||||
checkNum?: string;
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
id: string
|
||||
name: string
|
||||
bankId: string
|
||||
accountNumber: string
|
||||
type: "CHECKING" | "SAVINGS" | "CREDIT_CARD" | "OTHER"
|
||||
folderId: string | null
|
||||
balance: number
|
||||
currency: string
|
||||
lastImport: string | null
|
||||
id: string;
|
||||
name: string;
|
||||
bankId: string;
|
||||
accountNumber: string;
|
||||
type: "CHECKING" | "SAVINGS" | "CREDIT_CARD" | "OTHER";
|
||||
folderId: string | null;
|
||||
balance: number;
|
||||
currency: string;
|
||||
lastImport: string | null;
|
||||
}
|
||||
|
||||
export interface Folder {
|
||||
id: string
|
||||
name: string
|
||||
parentId: string | null
|
||||
color: string
|
||||
icon: string
|
||||
id: string;
|
||||
name: string;
|
||||
parentId: string | null;
|
||||
color: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export interface Category {
|
||||
id: string
|
||||
name: string
|
||||
color: string
|
||||
icon: string
|
||||
keywords: string[] // For auto-categorization
|
||||
parentId: string | null
|
||||
id: string;
|
||||
name: string;
|
||||
color: string;
|
||||
icon: string;
|
||||
keywords: string[]; // For auto-categorization
|
||||
parentId: string | null;
|
||||
}
|
||||
|
||||
export interface BankingData {
|
||||
accounts: Account[]
|
||||
transactions: Transaction[]
|
||||
folders: Folder[]
|
||||
categories: Category[]
|
||||
accounts: Account[];
|
||||
transactions: Transaction[];
|
||||
folders: Folder[];
|
||||
categories: Category[];
|
||||
}
|
||||
|
||||
// OFX Parsed types
|
||||
export interface OFXTransaction {
|
||||
fitId: string
|
||||
date: string
|
||||
amount: number
|
||||
name: string
|
||||
memo?: string
|
||||
checkNum?: string
|
||||
type: string
|
||||
fitId: string;
|
||||
date: string;
|
||||
amount: number;
|
||||
name: string;
|
||||
memo?: string;
|
||||
checkNum?: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface OFXAccount {
|
||||
bankId: string
|
||||
accountId: string
|
||||
accountType: string
|
||||
balance: number
|
||||
balanceDate: string
|
||||
currency: string
|
||||
transactions: OFXTransaction[]
|
||||
bankId: string;
|
||||
accountId: string;
|
||||
accountType: string;
|
||||
balance: number;
|
||||
balanceDate: string;
|
||||
currency: string;
|
||||
transactions: OFXTransaction[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user