// User types export interface User { id: string; email: string; nickname?: string; created_at: string; updated_at: string; } // Event types - for both Anniversary and Reminder export type EventType = 'anniversary' | 'reminder'; // Repeat types: 'daily'每天, 'weekly'每周, 'monthly'每月, 'yearly'每年, 'none'不重复 export type RepeatType = 'daily' | 'weekly' | 'monthly' | 'yearly' | 'none'; // Priority types: 'none'无色, 'red'红色, 'green'绿色, 'yellow'黄色 export type PriorityType = 'none' | 'red' | 'green' | 'yellow'; // Unified event type (matches backend API) export interface Event { id: string; user_id: string; type: EventType; title: string; content?: string; // Only for reminders date: string; // 当前提醒日期(展示用) is_lunar: boolean; repeat_type: RepeatType; repeat_interval?: number | null; // 周数间隔(仅 weekly 类型使用) next_reminder_date?: string | null; // 下一次提醒日期(计算用) is_holiday?: boolean; // Only for anniversaries is_completed?: boolean; // Only for reminders priority?: PriorityType; // Priority level for reminders created_at: string; updated_at: string; } // Note types export interface Note { id: string; user_id: string; content: string; // HTML content from rich text editor created_at: string; updated_at: string; } // AI Parsing types export interface AIParsedEvent { title: string; date: string; is_lunar: boolean; repeat_type: RepeatType; reminder_time?: string; type: EventType; } export interface AIConversation { id: string; user_id: string; message: string; response: string; parsed_events?: AIParsedEvent[]; created_at: string; } // Auth types export interface AuthState { user: User | null; isAuthenticated: boolean; isLoading: boolean; } export interface LoginCredentials { email: string; password: string; } export interface RegisterCredentials extends LoginCredentials { nickname?: string; } // API Response types export interface ApiResponse { data: T | null; error: string | null; } // Loading state types export type LoadingState = 'idle' | 'loading' | 'success' | 'error';