CMSCategoryItemData.swift 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. class func newInstance(map: Map) -> Mappable?{
  26. return CMSCategoryItemData()
  27. }
  28. required init?(map: Map){}
  29. private override init(){}
  30. func mapping(map: Map)
  31. {
  32. appId <- map["appId"]
  33. attachmentList <- map["attachmentList"]
  34. categoryAlias <- map["categoryAlias"]
  35. categoryId <- map["categoryId"]
  36. categoryName <- map["categoryName"]
  37. createTime <- map["createTime"]
  38. creatorCompany <- map["creatorCompany"]
  39. creatorDepartment <- map["creatorDepartment"]
  40. creatorIdentity <- map["creatorIdentity"]
  41. creatorPerson <- map["creatorPerson"]
  42. distributeFactor <- map["distributeFactor"]
  43. docStatus <- map["docStatus"]
  44. form <- map["form"]
  45. formName <- map["formName"]
  46. id <- map["id"]
  47. sequence <- map["sequence"]
  48. title <- map["title"]
  49. updateTime <- map["updateTime"]
  50. }
  51. /**
  52. * NSCoding required initializer.
  53. * Fills the data from the passed decoder
  54. */
  55. @objc required init(coder aDecoder: NSCoder)
  56. {
  57. appId = aDecoder.decodeObject(forKey: "appId") as? String
  58. attachmentList = aDecoder.decodeObject(forKey: "attachmentList") as? [AnyObject]
  59. categoryAlias = aDecoder.decodeObject(forKey: "categoryAlias") as? String
  60. categoryId = aDecoder.decodeObject(forKey: "categoryId") as? String
  61. categoryName = aDecoder.decodeObject(forKey: "categoryName") as? String
  62. createTime = aDecoder.decodeObject(forKey: "createTime") as? String
  63. creatorCompany = aDecoder.decodeObject(forKey: "creatorCompany") as? String
  64. creatorDepartment = aDecoder.decodeObject(forKey: "creatorDepartment") as? String
  65. creatorIdentity = aDecoder.decodeObject(forKey: "creatorIdentity") as? String
  66. creatorPerson = aDecoder.decodeObject(forKey: "creatorPerson") as? String
  67. distributeFactor = aDecoder.decodeObject(forKey: "distributeFactor") as? Int
  68. docStatus = aDecoder.decodeObject(forKey: "docStatus") as? String
  69. form = aDecoder.decodeObject(forKey: "form") as? String
  70. formName = aDecoder.decodeObject(forKey: "formName") as? String
  71. id = aDecoder.decodeObject(forKey: "id") as? String
  72. sequence = aDecoder.decodeObject(forKey: "sequence") as? String
  73. title = aDecoder.decodeObject(forKey: "title") as? String
  74. updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
  75. }
  76. /**
  77. * NSCoding required method.
  78. * Encodes mode properties into the decoder
  79. */
  80. @objc func encode(with aCoder: NSCoder)
  81. {
  82. if appId != nil{
  83. aCoder.encode(appId, forKey: "appId")
  84. }
  85. if attachmentList != nil{
  86. aCoder.encode(attachmentList, forKey: "attachmentList")
  87. }
  88. if categoryAlias != nil{
  89. aCoder.encode(categoryAlias, forKey: "categoryAlias")
  90. }
  91. if categoryId != nil{
  92. aCoder.encode(categoryId, forKey: "categoryId")
  93. }
  94. if categoryName != nil{
  95. aCoder.encode(categoryName, forKey: "categoryName")
  96. }
  97. if createTime != nil{
  98. aCoder.encode(createTime, forKey: "createTime")
  99. }
  100. if creatorCompany != nil{
  101. aCoder.encode(creatorCompany, forKey: "creatorCompany")
  102. }
  103. if creatorDepartment != nil{
  104. aCoder.encode(creatorDepartment, forKey: "creatorDepartment")
  105. }
  106. if creatorIdentity != nil{
  107. aCoder.encode(creatorIdentity, forKey: "creatorIdentity")
  108. }
  109. if creatorPerson != nil{
  110. aCoder.encode(creatorPerson, forKey: "creatorPerson")
  111. }
  112. if distributeFactor != nil{
  113. aCoder.encode(distributeFactor, forKey: "distributeFactor")
  114. }
  115. if docStatus != nil{
  116. aCoder.encode(docStatus, forKey: "docStatus")
  117. }
  118. if form != nil{
  119. aCoder.encode(form, forKey: "form")
  120. }
  121. if formName != nil{
  122. aCoder.encode(formName, forKey: "formName")
  123. }
  124. if id != nil{
  125. aCoder.encode(id, forKey: "id")
  126. }
  127. if sequence != nil{
  128. aCoder.encode(sequence, forKey: "sequence")
  129. }
  130. if title != nil{
  131. aCoder.encode(title, forKey: "title")
  132. }
  133. if updateTime != nil{
  134. aCoder.encode(updateTime, forKey: "updateTime")
  135. }
  136. }
  137. }