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.

44 lines
1.1 KiB

  1. //
  2. // CouponBoxModel.swift
  3. // GME Remit
  4. //
  5. // Created by Jeongbae Kong on 04/12/2019.
  6. // Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. struct CouponBoxModel: Mappable {
  11. var schemeId: String?
  12. var couponType: String?
  13. var couponName: String?
  14. var discountType: String?
  15. var discountValue: String?
  16. var expireDate: String?
  17. var buyDate: String?
  18. init?(map: Map) { }
  19. mutating func mapping(map: Map) {
  20. schemeId <- map["schemeId"]
  21. couponType <- map["couponType"]
  22. couponName <- map["couponName"]
  23. discountType <- map["discountType"]
  24. discountValue <- map["discountValue"]
  25. expireDate <- map["expireDate"]
  26. buyDate <- map["buyDate"]
  27. }
  28. }
  29. extension CouponBoxModel: Equatable {
  30. static func == (lhs: CouponBoxModel, rhs: CouponBoxModel) -> Bool {
  31. return lhs.schemeId == rhs.schemeId &&
  32. lhs.couponType == rhs.couponType &&
  33. lhs.couponName == rhs.couponName &&
  34. lhs.discountType == rhs.discountType &&
  35. lhs.discountValue == rhs.discountValue &&
  36. lhs.expireDate == rhs.expireDate &&
  37. lhs.buyDate == rhs.buyDate
  38. }
  39. }