/**
 * @copyright NHCarrigan
 * @license Naomi's Public License
 * @author Naomi Carrigan
 */

interface Like {
  id:         string;
  userId:     string;
  entityType: "book" | "game" | "show" | "manga" | "music" | "art";
  entityId:   string;
  createdAt:  Date;
}

type CreateLikeDto = Pick<Like, "entityType" | "entityId">;

interface LikeCountDto {
  entityId:   string;
  entityType: string;
  count:      number;
}

interface LikedItemDto {
  like: Like;

  /**
   * This will be the actual entity (Book, Game, etc.).
   */
  item: unknown;
}

// Response types
interface LikeResponse {
  liked: boolean;
  count: number;
}

export type { CreateLikeDto, Like, LikeCountDto, LikedItemDto, LikeResponse };
