export type CommentStatus = 'pending' | 'approved' | 'rejected';

export interface ProductCommentFilters {
  status?: CommentStatus;
  productId?: number;
  userId?: number;
  limit: number;
  offset: number;
}

export interface User {
  first_name: string;
  last_name: string;
}

export interface ProductComment {
  id: number;
  user_id: number;
  product_id: number;
  rating: number;
  subject: string;
  comment: string;
  comment_status: CommentStatus;
  created_at: string; // ISO 8601
  updated_at: string; // ISO 8601
  user?: User;
}

export interface ProductCommentsResponse {
  comments: ProductComment[];
  total: number;
  limit: number;
  offset: number;
  has_more: boolean;
}

export interface UpdateCommentStatusRequest {
  status: 'approved' | 'rejected';
}

export interface UpdateCommentStatusResponse extends ProductComment {}

export interface DeleteCommentResponse {
  message: string;
  deleted: boolean;
}

