- modified the data for live stream url in theme 1 and theme 2 with speicifed languages also with titles - modified FM url - worked on coredata crud. made functions for crud with queries - added default avatar images for guest - Finalised the Data Model and tried to save and update the counts in local
67 lines
1.4 KiB
Swift
67 lines
1.4 KiB
Swift
//
|
|
// 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"
|
|
}
|
|
}
|
|
|
|
}
|