Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MARK: - Character
- struct Character: Codable {
- let charID: Int
- let charName: String
- let charThumbnail: String
- let charThumbnailCropped: String
- let dateAdded: String
- let follow: Bool
- let entertainmentName: String?
- let entertainmentID, addedBy: Int?
- let products: [ProductElement]?
- let posts: [Post]?
- enum CodingKeys: String, CodingKey {
- case charID = "Char_id"
- case charName = "Char_name"
- case charThumbnail = "Char_thumbnail"
- case dateAdded = "Date_Added"
- case entertainmentName = "entertainment_name"
- case entertainmentID = "Entertainment_id"
- case addedBy = "Added_by"
- case follow
- case charThumbnailCropped = "Char_thumbnail_cropped"
- case products, posts
- }
- }
- // MARK: - Post
- struct Post: Codable {
- let postID: Int
- let postDescription: String
- let postThumbnail: String
- let postThumbnailCropped: String?
- let entertainmentID, characterID: Int
- enum CodingKeys: String, CodingKey {
- case postID = "Post_id"
- case postDescription = "Post_description"
- case postThumbnail = "Post_thumbnail"
- case entertainmentID = "Entertainment_id"
- case characterID = "Character_id"
- case postThumbnailCropped = "Post_thumbnail_cropped"
- }
- }
- // MARK: - Product
- struct ProductElement: Codable {
- let prodID: Int
- let prodThumbnail: String
- let imageURL: String?
- let customProdID: String?
- let brand, prodName, productDescription: String?
- let color, category, subCategory: String?
- let detailCategory: String?
- let dateAdded, episodeName: String?
- let exactMatch, saved: Bool
- let pStatus: Bool?
- let entertainmentCategory: String?
- let prodEntertainment: Int?
- let prodCharacter, addedBy: Int?
- enum CodingKeys: String, CodingKey {
- case prodID = "Prod_id"
- case prodThumbnail = "Prod_thumbnail"
- case imageURL = "Image_url"
- case customProdID = "Custom_prod_id"
- case brand = "Brand"
- case prodName = "Prod_name"
- case productDescription = "Description"
- case color = "Color"
- case category = "Category"
- case subCategory = "Sub_Category"
- case detailCategory = "Detail_Category"
- case dateAdded = "Date_Added"
- case episodeName = "Episode_name"
- case pStatus = "P_status"
- case exactMatch = "Exact_match"
- case entertainmentCategory = "Entertainment_category"
- case prodEntertainment = "Prod_Entertainment"
- case prodCharacter = "Prod_Character"
- case addedBy = "Added_by"
- case saved = "saved"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment