HotpicPlayerEntity.swift 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // HotpicPlayerEntity.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class HotpicPlayerEntity : NSObject, NSCoding, Mappable{
  7. var application : String?
  8. var createTime : String?
  9. var creator : String?
  10. var distributeFactor : Int?
  11. var id : String?
  12. var infoId : String?
  13. var picUrl : String?
  14. var sequence : String?
  15. var title : String?
  16. var updateTime : String?
  17. var url : String?
  18. class func newInstance(map: Map) -> Mappable?{
  19. return HotpicPlayerEntity()
  20. }
  21. required init?(map: Map){}
  22. private override init(){}
  23. func mapping(map: Map)
  24. {
  25. application <- map["application"]
  26. createTime <- map["createTime"]
  27. creator <- map["creator"]
  28. distributeFactor <- map["distributeFactor"]
  29. id <- map["id"]
  30. infoId <- map["infoId"]
  31. picUrl <- map["picUrl"]
  32. sequence <- map["sequence"]
  33. title <- map["title"]
  34. updateTime <- map["updateTime"]
  35. url <- map["url"]
  36. }
  37. /**
  38. * NSCoding required initializer.
  39. * Fills the data from the passed decoder
  40. */
  41. @objc required init(coder aDecoder: NSCoder)
  42. {
  43. application = aDecoder.decodeObject(forKey: "application") as? String
  44. createTime = aDecoder.decodeObject(forKey: "createTime") as? String
  45. creator = aDecoder.decodeObject(forKey: "creator") as? String
  46. distributeFactor = aDecoder.decodeObject(forKey: "distributeFactor") as? Int
  47. id = aDecoder.decodeObject(forKey: "id") as? String
  48. infoId = aDecoder.decodeObject(forKey: "infoId") as? String
  49. picUrl = aDecoder.decodeObject(forKey: "picUrl") as? String
  50. sequence = aDecoder.decodeObject(forKey: "sequence") as? String
  51. title = aDecoder.decodeObject(forKey: "title") as? String
  52. updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
  53. url = aDecoder.decodeObject(forKey: "url") as? String
  54. }
  55. /**
  56. * NSCoding required method.
  57. * Encodes mode properties into the decoder
  58. */
  59. @objc func encode(with aCoder: NSCoder)
  60. {
  61. if application != nil{
  62. aCoder.encode(application, forKey: "application")
  63. }
  64. if createTime != nil{
  65. aCoder.encode(createTime, forKey: "createTime")
  66. }
  67. if creator != nil{
  68. aCoder.encode(creator, forKey: "creator")
  69. }
  70. if distributeFactor != nil{
  71. aCoder.encode(distributeFactor, forKey: "distributeFactor")
  72. }
  73. if id != nil{
  74. aCoder.encode(id, forKey: "id")
  75. }
  76. if infoId != nil{
  77. aCoder.encode(infoId, forKey: "infoId")
  78. }
  79. if picUrl != nil{
  80. aCoder.encode(picUrl, forKey: "picUrl")
  81. }
  82. if sequence != nil{
  83. aCoder.encode(sequence, forKey: "sequence")
  84. }
  85. if title != nil{
  86. aCoder.encode(title, forKey: "title")
  87. }
  88. if updateTime != nil{
  89. aCoder.encode(updateTime, forKey: "updateTime")
  90. }
  91. if url != nil{
  92. aCoder.encode(url, forKey: "url")
  93. }
  94. }
  95. }