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

import type { Link } from "./common.types";

enum ShowType {
  tvSeries = "TV_SERIES",
  anime = "ANIME",
  film = "FILM",
  documentary = "DOCUMENTARY",
}

enum ShowStatus {
  watching = "WATCHING",
  completed = "COMPLETED",
  wantToWatch = "WANT_TO_WATCH",
  retired = "RETIRED",
}

interface Show {
  id:             string;
  title:          string;
  type:           ShowType;
  status:         ShowStatus;
  dateAdded:      Date;
  dateStarted?:   Date;
  dateCompleted?: Date;
  dateFinished?:  Date;
  rating?:        number;
  notes?:         string;
  coverImage?:    string;
  tags:           Array<string>;
  links:          Array<Link>;
  timeSpent?:     number;
  createdAt:      Date;
  updatedAt:      Date;
}

interface CreateShowDto {
  title:         string;
  type:          ShowType;
  status:        ShowStatus;
  dateStarted?:  Date;
  dateFinished?: Date;
  rating?:       number;
  notes?:        string;
  coverImage?:   string;
  tags?:         Array<string>;
  links?:        Array<Link>;
  timeSpent?:    number;
}

interface UpdateShowDto extends Partial<CreateShowDto> {
  dateStarted?:   Date;
  dateCompleted?: Date;
  dateFinished?:  Date;
}

export { ShowStatus, ShowType };
export type { CreateShowDto, Show, UpdateShowDto };
