No Description

StatusModel.swift 625B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // StatusModel.swift
  3. // PaiaiDataKit
  4. //
  5. // Created by FFIB on 2017/10/10.
  6. // Copyright © 2017年 FFIB. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. struct StatusModel {
  11. var status = 0
  12. var message = ""
  13. var description = ""
  14. init(json: [String: AnyObject]) {
  15. self.init(map: Map(mappingType: .fromJSON, JSON: json))
  16. }
  17. }
  18. extension StatusModel: Mappable {
  19. init(map: Map) {
  20. mapping(map: map)
  21. }
  22. mutating func mapping(map: Map) {
  23. status <- map["status"]
  24. message <- map["message"]
  25. description <- map["description"]
  26. }
  27. }