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

/**
 * 评论信息
 */
export interface Comment {
  id: number;
  userId: number;
  accountId: number;
  workId?: number;
  platform: PlatformType;
  videoId: string;
  videoTitle?: string;
  videoCoverUrl?: string;
  platformVideoUrl: string | null;
  commentId: string;
  parentCommentId: string | null;
  authorId: string;
  authorName: string;
  authorAvatar: string | null;
  content: string;
  likeCount: number;
  replyContent: string | null;
  repliedAt: string | null;
  isRead: boolean;
  isTop: boolean;
  commentTime: string;
  createdAt: string;
}

/**
 * 评论列表查询参数
 */
export interface CommentListQuery {
  accountId?: number;
  workId?: number;
  platform?: PlatformType;
  videoId?: string;
  isRead?: boolean;
  isReplied?: boolean;
  keyword?: string;
  page?: number;
  pageSize?: number;
  sortBy?: 'commentTime' | 'likeCount';
  sortOrder?: 'asc' | 'desc';
}

/**
 * 回复评论请求
 */
export interface ReplyCommentRequest {
  commentId: number;
  content: string;
}

/**
 * 批量回复评论请求
 */
export interface BatchReplyCommentRequest {
  commentIds: number[];
  content: string;
}

/**
 * 评论统计
 */
export interface CommentStats {
  totalCount: number;
  unreadCount: number;
  unrepliedCount: number;
  todayCount: number;
}
