// // BlogDM.swift // WOKA // // Created by MacBook Pro on 10/06/24. // import Foundation // MARK: - Welcome struct BlogDM: Codable { let blogs: [Blog]? let totalRecords: Int? enum CodingKeys: String, CodingKey { case blogs case totalRecords = "total_records" } // MARK: - Blog struct Blog: Codable { let id: Int? let title, description: String? let articleURL: String? let thumbnailPath: String? let categoryMasterID: String? let languageMasterID: Int? let contentMoreDetails: [ContentMoreDetail]? enum CodingKeys: String, CodingKey { case id, title, description case articleURL = "article_url" case thumbnailPath = "thumbnail_path" case categoryMasterID = "category_master_id" case languageMasterID = "language_master_id" case contentMoreDetails = "content_more_details" } } // MARK: - ContentMoreDetail struct ContentMoreDetail: Codable { let id, contentID, postType: Int? let title, description: String? let languageMasterID: Int? let article: String? enum CodingKeys: String, CodingKey { case id case contentID = "content_id" case postType = "post_type" case title, description case languageMasterID = "language_master_id" case article } } }