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

import com.google.gson.annotations.SerializedName

data class OmdbSearchResponse(
    @SerializedName("Search") val search: List<OmdbMovieSearchDto>?,
    @SerializedName("totalResults") val totalResults: String?,
    @SerializedName("Response") val response: String,
    @SerializedName("Error") val error: String?
) {
    val isSuccess: Boolean get() = response == "True"
}

data class OmdbMovieSearchDto(
    @SerializedName("Title") val title: String,
    @SerializedName("Year") val year: String,
    @SerializedName("imdbID") val imdbId: String,
    @SerializedName("Type") val type: String,
    @SerializedName("Poster") val poster: String?
) {
    val hasValidPoster: Boolean get() = poster != null && poster != "N/A"
}