//
//  WallpaperModel.swift
//  wallpaper_project


import UIKit
@objcMembers
class WallpaperModel: NSObject,Decodable,Encodable  {
    var name:String?
    let data: [WallpaperData]
}
class WallpaperData: NSObject,Codable {
     var original: String?
     var previewThumb: String?
     var source: String?
     var banner:String?
    
    
    enum CodingKeys: String, CodingKey {
           case original
           case previewThumb
           case source
           case banner
     
       }
       
       // 实现 Decodable 协议中的初始化方法
       required override init() {
           super.init()
       }
       
       // 实现 Encodable 协议中的编码方法
       func encode(to encoder: Encoder) throws {
           var container = encoder.container(keyedBy: CodingKeys.self)
           try container.encode(original, forKey: .original)
           try container.encode(previewThumb, forKey: .previewThumb)
           try container.encode(source, forKey: .source)
           try container.encode(banner, forKey: .banner)

       }
}
