import type { PlatformType } from './platform.js';

/**
 * 单日数据统计
 */
export interface DailyAnalytics {
  id: number;
  userId: number;
  accountId: number;
  date: string;
  fansCount: number;
  fansIncrease: number;
  viewsCount: number;
  likesCount: number;
  commentsCount: number;
  sharesCount: number;
  income: number;
  createdAt: string;
}

/**
 * 数据统计查询参数
 */
export interface AnalyticsQuery {
  accountId?: number;
  platform?: PlatformType;
  startDate: string;
  endDate: string;
}

/**
 * 汇总统计数据
 */
export interface AnalyticsSummary {
  totalFans: number;
  totalFansIncrease: number;
  totalViews: number;
  totalLikes: number;
  totalComments: number;
  totalShares: number;
  totalIncome: number;
}

/**
 * 趋势数据点
 */
export interface TrendDataPoint {
  date: string;
  value: number;
}

/**
 * 趋势数据
 */
export interface AnalyticsTrend {
  fans: TrendDataPoint[];
  views: TrendDataPoint[];
  likes: TrendDataPoint[];
  comments: TrendDataPoint[];
  shares: TrendDataPoint[];
  income: TrendDataPoint[];
}

/**
 * 平台数据对比
 */
export interface PlatformComparison {
  platform: PlatformType;
  accountName: string;
  fansCount: number;
  fansIncrease: number;
  viewsCount: number;
  likesCount: number;
  commentsCount: number;
}

/**
 * 内容表现排行
 */
export interface ContentRanking {
  videoId: string;
  platform: PlatformType;
  title: string;
  viewsCount: number;
  likesCount: number;
  commentsCount: number;
  sharesCount: number;
  publishedAt: string;
}
