CMSCategoryItemData.swift 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //
  2. // CMSCategoryItemData.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class CMSCategoryItemData : NSObject, NSCoding, Mappable{
  7. var appId : String?
  8. var attachmentList : [AnyObject]?
  9. var categoryAlias : String?
  10. var categoryId : String?
  11. var categoryName : String?
  12. var createTime : String?
  13. var creatorCompany : String?
  14. var creatorDepartment : String?
  15. var creatorIdentity : String?
  16. var creatorPerson : String?
  17. var distributeFactor : Int?
  18. var docStatus : String?
  19. var form : String?
  20. var formName : String?
  21. var id : String?
  22. var sequence : String?
  23. var title : String?
  24. var updateTime : String?
  25. var publishTime : String?
  26. class func newInstance(map: Map) -> Mappable?{
  27. return CMSCategoryItemData()
  28. }
  29. required init?(map: Map){}
  30. private override init(){}
  31. func mapping(map: Map)
  32. {
  33. appId <- map["appId"]
  34. attachmentList <- map["attachmentList"]
  35. categoryAlias <- map["categoryAlias"]
  36. categoryId <- map["categoryId"]
  37. categoryName <- map["categoryName"]
  38. createTime <- map["createTime"]
  39. creatorCompany <- map["creatorCompany"]
  40. creatorDepartment <- map["creatorDepartment"]
  41. creatorIdentity <- map["creatorIdentity"]
  42. creatorPerson <- map["creatorPerson"]
  43. distributeFactor <- map["distributeFactor"]
  44. docStatus <- map["docStatus"]
  45. form <- map["form"]
  46. formName <- map["formName"]
  47. id <- map["id"]
  48. sequence <- map["sequence"]
  49. title <- map["title"]
  50. updateTime <- map["updateTime"]
  51. publishTime <- map["publishTime"]
  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. attachmentList = aDecoder.decodeObject(forKey: "attachmentList") as? [AnyObject]
  61. categoryAlias = aDecoder.decodeObject(forKey: "categoryAlias") as? String
  62. categoryId = aDecoder.decodeObject(forKey: "categoryId") as? String
  63. categoryName = aDecoder.decodeObject(forKey: "categoryName") as? String
  64. createTime = aDecoder.decodeObject(forKey: "createTime") as? String
  65. creatorCompany = aDecoder.decodeObject(forKey: "creatorCompany") as? String
  66. creatorDepartment = aDecoder.decodeObject(forKey: "creatorDepartment") as? String
  67. creatorIdentity = aDecoder.decodeObject(forKey: "creatorIdentity") as? String
  68. creatorPerson = aDecoder.decodeObject(forKey: "creatorPerson") as? String
  69. distributeFactor = aDecoder.decodeObject(forKey: "distributeFactor") as? Int
  70. docStatus = aDecoder.decodeObject(forKey: "docStatus") as? String
  71. form = aDecoder.decodeObject(forKey: "form") as? String
  72. formName = aDecoder.decodeObject(forKey: "formName") as? String
  73. id = aDecoder.decodeObject(forKey: "id") as? String
  74. sequence = aDecoder.decodeObject(forKey: "sequence") as? String
  75. title = aDecoder.decodeObject(forKey: "title") as? String
  76. updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
  77. publishTime = aDecoder.decodeObject(forKey: "publishTime") 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 attachmentList != nil{
  89. aCoder.encode(attachmentList, forKey: "attachmentList")
  90. }
  91. if categoryAlias != nil{
  92. aCoder.encode(categoryAlias, forKey: "categoryAlias")
  93. }
  94. if categoryId != nil{
  95. aCoder.encode(categoryId, forKey: "categoryId")
  96. }
  97. if categoryName != nil{
  98. aCoder.encode(categoryName, forKey: "categoryName")
  99. }
  100. if createTime != nil{
  101. aCoder.encode(createTime, forKey: "createTime")
  102. }
  103. if creatorCompany != nil{
  104. aCoder.encode(creatorCompany, forKey: "creatorCompany")
  105. }
  106. if creatorDepartment != nil{
  107. aCoder.encode(creatorDepartment, forKey: "creatorDepartment")
  108. }
  109. if creatorIdentity != nil{
  110. aCoder.encode(creatorIdentity, forKey: "creatorIdentity")
  111. }
  112. if creatorPerson != nil{
  113. aCoder.encode(creatorPerson, forKey: "creatorPerson")
  114. }
  115. if distributeFactor != nil{
  116. aCoder.encode(distributeFactor, forKey: "distributeFactor")
  117. }
  118. if docStatus != nil{
  119. aCoder.encode(docStatus, forKey: "docStatus")
  120. }
  121. if form != nil{
  122. aCoder.encode(form, forKey: "form")
  123. }
  124. if formName != nil{
  125. aCoder.encode(formName, forKey: "formName")
  126. }
  127. if id != nil{
  128. aCoder.encode(id, forKey: "id")
  129. }
  130. if sequence != nil{
  131. aCoder.encode(sequence, forKey: "sequence")
  132. }
  133. if title != nil{
  134. aCoder.encode(title, forKey: "title")
  135. }
  136. if updateTime != nil{
  137. aCoder.encode(updateTime, forKey: "updateTime")
  138. }
  139. if publishTime != nil{
  140. aCoder.encode(publishTime, forKey: "publishTime")
  141. }
  142. }
  143. }