//
//  URLStaticDM.swift
//  WOKA
//
//  Created by Bilal on 06/08/2024.
//

import Foundation

// MARK: - URLStaticDM
struct URLStaticDM: Codable {
    let liveFmData: LiveFmData?
    let liveData: [LiveDatum]?

    enum CodingKeys: String, CodingKey {
        case liveFmData = "live_fm_data"
        case liveData = "live_data"
    }
    
    // MARK: - LiveDatum
    struct LiveDatum: Codable {
        let id: Int?
        let name: Name?
        let liveURL: LiveURL?

        enum CodingKeys: String, CodingKey {
            case id, name
            case liveURL = "live_url"
        }
    }

    // MARK: - LiveURL
    struct LiveURL: Codable {
        let hdURLEn, hdURLHin, sdURLEn, sdURLHin: String?

        enum CodingKeys: String, CodingKey {
            case hdURLEn = "hd_url_en"
            case hdURLHin = "hd_url_hin"
            case sdURLEn = "sd_url_en"
            case sdURLHin = "sd_url_hin"
        }
    }

    // MARK: - Name
    struct Name: Codable {
        let titleEn, titleHin: String?

        enum CodingKeys: String, CodingKey {
            case titleEn = "title_en"
            case titleHin = "title_hin"
        }
    }

    // MARK: - LiveFmData
    struct LiveFmData: Codable {
        let id: Int?
        let title: String?
        let liveFmURL: String?

        enum CodingKeys: String, CodingKey {
            case id, title
            case liveFmURL = "live_fm_url"
        }
    }

}
