CMSPublishInfoData.swift 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //
  2. // CMSData.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class CMSPublishInfoData : NSObject, NSCoding, Mappable{
  7. var appId : String?
  8. var categoryId : String?
  9. var createTime : String?
  10. var creatorUid : String?
  11. var distributeFactor : Int?
  12. var documentId : String?
  13. var `extension` : String?
  14. var fileHost : String?
  15. var fileName : String? //后台存储的文件名称
  16. var filePath : String?
  17. var fileType : String?
  18. var id : String?
  19. var lastUpdateTime : String?
  20. var length : Int?
  21. var name : String? //原文件名称
  22. var sequence : String?
  23. var site : String?
  24. var storage : String?
  25. var updateTime : String?
  26. class func newInstance(map: Map) -> Mappable?{
  27. return CMSPublishInfoData()
  28. }
  29. required init?(map: Map){}
  30. private override init(){}
  31. func mapping(map: Map)
  32. {
  33. appId <- map["appId"]
  34. categoryId <- map["categoryId"]
  35. createTime <- map["createTime"]
  36. creatorUid <- map["creatorUid"]
  37. distributeFactor <- map["distributeFactor"]
  38. documentId <- map["documentId"]
  39. `extension` <- map["extension"]
  40. fileHost <- map["fileHost"]
  41. fileName <- map["fileName"]
  42. filePath <- map["filePath"]
  43. fileType <- map["fileType"]
  44. id <- map["id"]
  45. lastUpdateTime <- map["lastUpdateTime"]
  46. length <- map["length"]
  47. name <- map["name"]
  48. sequence <- map["sequence"]
  49. site <- map["site"]
  50. storage <- map["storage"]
  51. updateTime <- map["updateTime"]
  52. }
  53. /**
  54. * NSCoding required initializer.
  55. * Fills the data from the passed decoder
  56. */
  57. @objc required init(coder aDecoder: NSCoder)
  58. {
  59. appId = aDecoder.decodeObject(forKey: "appId") as? String
  60. categoryId = aDecoder.decodeObject(forKey: "categoryId") as? String
  61. createTime = aDecoder.decodeObject(forKey: "createTime") as? String
  62. creatorUid = aDecoder.decodeObject(forKey: "creatorUid") as? String
  63. distributeFactor = aDecoder.decodeObject(forKey: "distributeFactor") as? Int
  64. documentId = aDecoder.decodeObject(forKey: "documentId") as? String
  65. `extension` = aDecoder.decodeObject(forKey: "extension") as? String
  66. fileHost = aDecoder.decodeObject(forKey: "fileHost") as? String
  67. fileName = aDecoder.decodeObject(forKey: "fileName") as? String
  68. filePath = aDecoder.decodeObject(forKey: "filePath") as? String
  69. fileType = aDecoder.decodeObject(forKey: "fileType") as? String
  70. id = aDecoder.decodeObject(forKey: "id") as? String
  71. lastUpdateTime = aDecoder.decodeObject(forKey: "lastUpdateTime") as? String
  72. length = aDecoder.decodeObject(forKey: "length") as? Int
  73. name = aDecoder.decodeObject(forKey: "name") as? String
  74. sequence = aDecoder.decodeObject(forKey: "sequence") as? String
  75. site = aDecoder.decodeObject(forKey: "site") as? String
  76. storage = aDecoder.decodeObject(forKey: "storage") as? String
  77. updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
  78. }
  79. /**
  80. * NSCoding required method.
  81. * Encodes mode properties into the decoder
  82. */
  83. @objc func encode(with aCoder: NSCoder)
  84. {
  85. if appId != nil{
  86. aCoder.encode(appId, forKey: "appId")
  87. }
  88. if categoryId != nil{
  89. aCoder.encode(categoryId, forKey: "categoryId")
  90. }
  91. if createTime != nil{
  92. aCoder.encode(createTime, forKey: "createTime")
  93. }
  94. if creatorUid != nil{
  95. aCoder.encode(creatorUid, forKey: "creatorUid")
  96. }
  97. if distributeFactor != nil{
  98. aCoder.encode(distributeFactor, forKey: "distributeFactor")
  99. }
  100. if documentId != nil{
  101. aCoder.encode(documentId, forKey: "documentId")
  102. }
  103. if `extension` != nil{
  104. aCoder.encode(`extension`, forKey: "extension")
  105. }
  106. if fileHost != nil{
  107. aCoder.encode(fileHost, forKey: "fileHost")
  108. }
  109. if fileName != nil{
  110. aCoder.encode(fileName, forKey: "fileName")
  111. }
  112. if filePath != nil{
  113. aCoder.encode(filePath, forKey: "filePath")
  114. }
  115. if fileType != nil{
  116. aCoder.encode(fileType, forKey: "fileType")
  117. }
  118. if id != nil{
  119. aCoder.encode(id, forKey: "id")
  120. }
  121. if lastUpdateTime != nil{
  122. aCoder.encode(lastUpdateTime, forKey: "lastUpdateTime")
  123. }
  124. if length != nil{
  125. aCoder.encode(length, forKey: "length")
  126. }
  127. if name != nil{
  128. aCoder.encode(name, forKey: "name")
  129. }
  130. if sequence != nil{
  131. aCoder.encode(sequence, forKey: "sequence")
  132. }
  133. if site != nil{
  134. aCoder.encode(site, forKey: "site")
  135. }
  136. if storage != nil{
  137. aCoder.encode(storage, forKey: "storage")
  138. }
  139. if updateTime != nil{
  140. aCoder.encode(updateTime, forKey: "updateTime")
  141. }
  142. }
  143. }