Files
Woka_Native_iOS/WOKA/Home/Model/FavouriteListingDM.swift
BilalKhanWDI bf98cc89b1 - Worked with woka react native for analysing the issues.
- Finished favourite and like in episode listing screen, also updating the websites view
- Handled the teaser data player play. Also now teaser will play according to category language, titles and desc will be base on app language
- My list merged hindi and English. Now if hindi version is like and same content is aavailable in English it will be replicated
- Handled the fav and likes reload if user navigates from my list to season rising
2024-06-27 19:51:43 +05:30

125 lines
4.6 KiB
Swift

//
// 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 {
var showData: [ShowDatum]?
var videoData: [Datum]?
var gameData, audioData, singKaraokeData: [Datum]?
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"
}
// 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: - ContentMoreDetail
// struct ContentMoreDetail: Codable {
// let id, contentID, postType, languageMasterID: Int?
// let title, description: String?
// let url: String?
// let tagsKeywords: String?
//
// enum CodingKeys: String, CodingKey {
// case id
// case contentID = "content_id"
// case postType = "post_type"
// case languageMasterID = "language_master_id"
// case title, description, url
// case tagsKeywords = "tags_keywords"
// }
// }
// MARK: - ShowDatum
struct ShowDatum: Codable {
let id: Int?
let title, description: String?
let thumbnailPath: String?
let showType: String?
let totalSeasons, totalEpisodes: Int?
let categoryMasterID, ageRangeMasterID, genderMasterID: 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"
}
}
}
}