export type Gender = "male" | "female" | "other" export type LifeStatus = "living" | "deceased" | "unknown" export interface FamilyStory { id: string title: string content: string date?: string imageIds?: string[] createdAt: string updatedAt: string } export interface FamilyMember { id: string // Basic Info surname: string // 姓 givenName: string // 名 fullName: string // Display name (usually Surname + GivenName) // Chinese Specifics generation: number // 世/代 (1-based index from progenitor) generationName?: string // 字辈/派语 courtesyName?: string // 字 artName?: string // 号 posthumousName?: string // 谥号 gender: Gender rank?: number // Order among siblings (1 = eldest) // Dates birthDate?: string // ISO format or Chinese Lunar Date string deathDate?: string isLunarDate?: boolean // If true, display as lunar // Location ancestralHome?: string // 籍贯 birthPlace?: string burialPlace?: string // 墓地 (for deceased) // Contact Information phone?: string // 手机号 telephone?: string // 固定电话 email?: string // 邮箱 address?: string // 现居地址 // Relationships (Adjacency List style) fatherId?: string motherId?: string spouseIds: string[] childrenIds: string[] // 配偶父母信息(文本形式,用于非家族成员) spouseFatherName?: string // 岳父/公公姓名 spouseMotherName?: string // 岳母/婆婆姓名 // Content bio?: string tags?: string[] // e.g., "Famous", "Official", "Scholar" avatarUrl?: string avatarImageId?: string // ID referencing the 'images' table in Dexie photoIds?: string[] // 照片墙 - 多张照片的 ID 数组 stories?: FamilyStory[] // 家族故事 // Metadata createdAt: string updatedAt: string } export interface FamilyTreeData { members: Record // ID -> Member map for O(1) access rootId?: string // The progenitor }