You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

5 years ago
  1. //
  2. // PersonalInformationModel.swift
  3. // GME Remit
  4. //
  5. // Created by Jeongbae Kong on 05/02/2020.
  6. // Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. struct PersonalInformationModel: Mappable {
  11. var userId: String?
  12. var nationality: String?
  13. var birthday: String?
  14. var mobile: String?
  15. var email: String?
  16. var homeAddress: String?
  17. var cityName: String?
  18. var city: [KeyValue]?
  19. init?(map: Map) { }
  20. mutating func mapping(map: Map) {
  21. userId <- map["userId"]
  22. nationality <- map["nationality"]
  23. birthday <- map["birthday"]
  24. mobile <- map["mobile"]
  25. email <- map["email"]
  26. homeAddress <- map["homeAddress"]
  27. cityName <- map["cityName"]
  28. city <- map["City"]
  29. }
  30. }
  31. extension PersonalInformationModel: Equatable {
  32. static func == (lhs: PersonalInformationModel, rhs: PersonalInformationModel) -> Bool {
  33. return lhs.userId == rhs.userId &&
  34. lhs.nationality == rhs.nationality &&
  35. lhs.birthday == rhs.birthday &&
  36. lhs.mobile == rhs.mobile &&
  37. lhs.email == rhs.email &&
  38. lhs.homeAddress == rhs.homeAddress &&
  39. lhs.cityName == rhs.cityName
  40. }
  41. }
  42. extension PersonalInformationModel: TablePresenterProtocol {
  43. var cellTitle: String? {
  44. return cityName
  45. }
  46. var cellImage: UIImage? {
  47. return nil
  48. }
  49. }