export enum TransactionType { EXPENSE = 'expense', INCOME = 'income', } export enum ExpenseCategory { FOOD = '餐饮', SHOPPING = '购物', TRANSPORT = '交通', HOUSING = '住房', ENTERTAINMENT = '娱乐', MEDICAL = '医疗', SOCIAL = '人情', EDUCATION = '学习', FINANCE = '金融', CHILD = '孩子', PET = '宠物', CAR = '汽车', BEAUTY = '美容', BUSINESS = '经营', MISC = '杂项', } export enum IncomeCategory { SALARY = '工资', BONUS = '奖金', INVESTMENT = '理财', PARTTIME = '兼职', GIFT = '红包', OTHER = '其他收入', } export interface Transaction { id: string; item: string; amount: number; type: TransactionType; category: string; // Takes values from ExpenseCategory or IncomeCategory date: string; // ISO string YYYY-MM-DD timestamp: number; } export interface Message { id: string; role: 'user' | 'assistant'; content: string; timestamp: number; relatedTransactionId?: string; // If this message created a transaction } export interface BillReminder { id: string; title: string; amount?: number; // Made optional frequency: 'monthly' | 'once'; targetDate: string; // 'DD' (e.g. "15") for monthly, or 'YYYY-MM-DD' for once isCompleted: boolean; } // Global augmentation for Web Speech API declare global { interface Window { SpeechRecognition: any; webkitSpeechRecognition: any; } } export interface DailyStat { date: string; total: number; breakdown: { name: string; value: number; fill: string }[]; }