export interface UserDoc {
  uid: string
  displayName: string
  email?: string
  coupleId?: string
  fcmToken?: string
  hasPremium: boolean
  createdAt: FirebaseFirestore.Timestamp
  notifPartnerAnswered?: boolean
  notifChatMessage?: boolean
}

export interface CoupleDoc {
  userIds: string[]
  createdAt: FirebaseFirestore.Timestamp
  streakCount: number
  lastStreakAt?: FirebaseFirestore.Timestamp
}

export interface AnswerDoc {
  userId: string
  answeredAt: FirebaseFirestore.Timestamp
}

export interface RevenueCatEvent {
  event: {
    id: string                // Event ID for idempotency
    type: string
    app_user_id: string
    product_id: string
    period_type?: string
    expiration_at_ms?: number
    is_family_share?: boolean
    entitlement?: {
      identifier: string
      product_id: string
    }
    entitlement_id?: string     // Alternative field name
    store?: 'app_store' | 'play_store' | 'mac_store' | 'stripe' | 'unknown'
    environment?: 'SANDBOX' | 'PRODUCTION'
  }
}
