export type Gender = "MALE" | "FEMALE" | "OTHER" export type LifeStatus = "living" | "deceased" | "unknown" export interface FamilyPhoto { url: string caption?: string // 照片说明(选填) uploadedAt: string // 上传时间 visibleInOverview?: boolean // 成员是否希望在总览中展示 adminVisibleOverride?: boolean // 管理员是否允许展示(默认允许) } 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) isFounder?: boolean // 是否为始祖 // Dates birthDate?: string // ISO format or Chinese Lunar Date string deathDate?: string isLunarDate?: boolean // If true, display as lunar // Location ancestralHome?: string // 籍贯 birthPlace?: string deathPlace?: string // 逝世地 burialPlace?: string // 墓地 (for deceased) // Contact Information phone?: string // 手机号 telephone?: string // 固定电话 email?: string // 邮箱 address?: string // 现居地址 occupation?: 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 photoIds?: string[] // 照片墙 - 旧格式 URL 数组(兼容) photos?: FamilyPhoto[] // 照片墙 - 新格式(包含说明和时间) stories?: FamilyStory[] // 家族故事 // Metadata createdAt: string updatedAt: string } export interface FamilyTreeData { members: Record // ID -> Member map for O(1) access rootId?: string // The progenitor }