IdentityV2.swift 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // IdentityV2.swift
  3. // O2Platform
  4. //
  5. // Created by 程剑 on 2017/7/9.
  6. // Copyright © 2017年 zoneland. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. class IdentityV2:NSObject,Mappable{
  11. var createTime : String?
  12. var department : String?
  13. var descriptionField : String?
  14. var distinguishedName : String?
  15. var id : String?
  16. var name : String?
  17. var person : String?
  18. var pinyin : String?
  19. var pinyinInitial : String?
  20. var unique : String?
  21. var unit : String?
  22. var unitLevel : Int?
  23. var unitLevelName : String?
  24. var major: Bool? //是否主身份
  25. var unitName : String?
  26. var updateTime : String?
  27. var orderNumber : Int?
  28. var woUnit : OrgUnit?
  29. //var woPerson:[AnyObject]?
  30. //var woUnitDutyList : [AnyObject]?
  31. required init?(map: Map) {
  32. }
  33. func mapping(map: Map) {
  34. createTime <- map["createTime"]
  35. department <- map["department"]
  36. descriptionField <- map["description"]
  37. distinguishedName <- map["distinguishedName"]
  38. id <- map["id"]
  39. name <- map["name"]
  40. person <- map["person"]
  41. pinyin <- map["pinyin"]
  42. pinyinInitial <- map["pinyinInitial"]
  43. unique <- map["unique"]
  44. unit <- map["unit"]
  45. unitLevel <- map["unitLevel"]
  46. unitLevelName <- map["unitLevelName"]
  47. major <- map["major"]
  48. unitName <- map["unitName"]
  49. updateTime <- map["updateTime"]
  50. orderNumber <- map["orderNumber"]
  51. woUnit <- map["woUnit"]
  52. }
  53. public static func ==(lhs: IdentityV2, rhs: IdentityV2) -> Bool {
  54. return lhs.distinguishedName == rhs.distinguishedName
  55. }
  56. override var description: String {
  57. return "\(name!)(\(unitName!))"
  58. }
  59. }