package com.horrortv.app.data.remote.omdb.dto

import com.google.gson.annotations.SerializedName

data class OmdbMovieDetailDto(
    @SerializedName("Title") val title: String = "",
    @SerializedName("Year") val year: String = "",
    @SerializedName("Rated") val rated: String? = null,
    @SerializedName("Released") val released: String? = null,
    @SerializedName("Runtime") val runtime: String? = null,
    @SerializedName("Genre") val genre: String? = null,
    @SerializedName("Director") val director: String? = null,
    @SerializedName("Writer") val writer: String? = null,
    @SerializedName("Actors") val actors: String? = null,
    @SerializedName("Plot") val plot: String? = null,
    @SerializedName("Language") val language: String? = null,
    @SerializedName("Country") val country: String? = null,
    @SerializedName("Awards") val awards: String? = null,
    @SerializedName("Poster") val poster: String? = null,
    @SerializedName("Metascore") val metascore: String? = null,
    @SerializedName("imdbRating") val imdbRating: String? = null,
    @SerializedName("imdbVotes") val imdbVotes: String? = null,
    @SerializedName("imdbID") val imdbId: String = "",
    @SerializedName("Type") val type: String = "",
    @SerializedName("Response") val response: String = "",
    @SerializedName("Error") val error: String? = null
) {
    val isSuccess: Boolean get() = response == "True"
    val hasValidPoster: Boolean get() = poster != null && poster != "N/A"
}