//
//  FavouriteListingDM.swift
//  WOKA
//
//  Created by MacBook Pro on 13/06/24.
//

import Foundation

// MARK: - FavouriteListingDM
struct FavouriteListingDM: Codable {
    let result: ResultData?
    
    // MARK: - Result
    struct ResultData: Codable {
        let totalRecords: Int?
        var showData: ShowData?
        var videoData: [Datum]?
        var gameData: [GamesListDM.GameDatum]?
        var singKaraokeData : [KaraokeListingDM.KaraokeDatum]?
        var audioData : [ListenAudioListingDM.AudioDatum]?
        
        enum CodingKeys: String, CodingKey {
            case showData = "show_data"
            case videoData = "video_data"
            case gameData = "game_data"
            case audioData = "audio_data"
            case singKaraokeData = "sing_karaoke_data"
            case totalRecords = "total_records"
        }
        
        // MARK: - Datum
        struct Datum: Codable {
            let id: Int?
            let title, description: String?
            let thumbnailPath: String?
            let audioURL: String?
            let categoryMasterID, ageRangeMasterID, tagsKeyword, releaseDate: String?
            let languageMasterID: Int?
            let genderMasterID, audioDuration, mediaID: String?
            let contentMoreDetails: [WebSeriesShowListDM.MoreDetail]?
            var markAsFavourite, isLiked: Bool?
            var viewsCount, likesCount, bookmarkCount: Int?
            let bookmarkCategoryIDS: String?
            let gameURL: String?
            let screenOrientation: String?
            let videoURL: String?
            let duration: String?

            enum CodingKeys: String, CodingKey {
                case id, title, description
                case thumbnailPath = "thumbnail_path"
                case audioURL = "audio_url"
                case categoryMasterID = "category_master_id"
                case ageRangeMasterID = "age_range_master_id"
                case tagsKeyword = "tags_keyword"
                case releaseDate = "release_date"
                case languageMasterID = "language_master_id"
                case genderMasterID = "gender_master_id"
                case audioDuration = "audio_duration"
                case mediaID = "media_id"
                case contentMoreDetails = "content_more_details"
                case markAsFavourite = "mark_as_favourite"
                case isLiked = "is_liked"
                case viewsCount = "views_count"
                case likesCount = "likes_count"
                case bookmarkCount = "bookmark_count"
                case bookmarkCategoryIDS = "bookmark_category_ids"
                case gameURL = "game_url"
                case screenOrientation = "screen_orientation"
                case videoURL = "video_url"
                case duration
            }
        }

        // MARK: - ShowData
        struct ShowData: Codable {
            var hindi, english: [ShowDatum]?
        }
        // MARK: - ShowDatum
        struct ShowDatum: Codable {
            let id: Int?
            let title, description: String?
            let thumbnailPath: String?
            let showType: String?
            let totalSeasons, totalEpisodes: Int?
            let ageRangeMasterID, genderMasterID: String?
            var categoryMasterID : String?
            let contentMoreDetails: [WebSeriesShowListDM.MoreDetail]?
            var markAsFavourite, isLiked: Bool?
            var likesCount : Int?
            let viewsCount, bookmarkCount: Int?
            var bookmarkCategoryIDS: String?

            enum CodingKeys: String, CodingKey {
                case id, title, description
                case thumbnailPath = "thumbnail_path"
                case showType = "show_type"
                case totalSeasons = "total_seasons"
                case totalEpisodes = "total_episodes"
                case categoryMasterID = "category_master_id"
                case ageRangeMasterID = "age_range_master_id"
                case genderMasterID = "gender_master_id"
                case contentMoreDetails = "content_more_details"
                case markAsFavourite = "mark_as_favourite"
                case isLiked = "is_liked"
                case viewsCount = "views_count"
                case likesCount = "likes_count"
                case bookmarkCount = "bookmark_count"
                case bookmarkCategoryIDS = "bookmark_category_ids"
            }
        }

    }
}
