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

import com.google.gson.annotations.SerializedName

data class OmdbSearchResponse(
    @SerializedName("Search") val search: List<OmdbMovieSearchDto> = emptyList(),
    @SerializedName("totalResults") val totalResults: String? = null,
    @SerializedName("Response") val response: String = "",
    @SerializedName("Error") val error: String? = null
) {
    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? = null
) {
    val hasValidPoster: Boolean get() = poster != null && poster != "N/A"
}