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.
73 lines
2.0 KiB
73 lines
2.0 KiB
//
|
|
// Order.swift
|
|
// GME Remit
|
|
//
|
|
// Created by InKwon Devik Kim on 14/05/2019.
|
|
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import ObjectMapper
|
|
|
|
struct Order: Mappable {
|
|
var orderID: String?
|
|
var productCode: String?
|
|
var productName: String?
|
|
var usePoint: String?
|
|
var orderType: String?
|
|
var recvType: String?
|
|
var branchCode: String?
|
|
var recvAddress: String?
|
|
var recvZipCode: String?
|
|
var recvPhoneNumber: String?
|
|
var recvName: String?
|
|
var orderStatus: String?
|
|
var createdDate: String?
|
|
var modifiedDate: String?
|
|
var branchName: String?
|
|
var recvDate: String?
|
|
|
|
init?(map: Map) { }
|
|
|
|
mutating func mapping(map: Map) {
|
|
orderID <- map["orderId"]
|
|
productCode <- map["productCode"]
|
|
productName <- map["productName"]
|
|
usePoint <- map["usePoint"]
|
|
orderType <- map["orderType"]
|
|
recvType <- map["recvType"]
|
|
branchCode <- map["branchCode"]
|
|
recvAddress <- map["recvAddress"]
|
|
recvZipCode <- map["recvZipCode"]
|
|
recvPhoneNumber <- map["recvPhoneNumber"]
|
|
recvName <- map["recvName"]
|
|
orderStatus <- map["orderStatus"]
|
|
createdDate <- map["createdDate"]
|
|
modifiedDate <- map["modifiedDate"]
|
|
recvDate <- map["recvDate"]
|
|
branchName <- map["branchName"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
extension Order: Equatable {
|
|
static func == (lhs: Order, rhs: Order) -> Bool {
|
|
return lhs.orderID == rhs.orderID &&
|
|
lhs.productCode == rhs.productCode &&
|
|
lhs.productName == rhs.productName &&
|
|
lhs.usePoint == rhs.usePoint &&
|
|
lhs.orderType == rhs.orderType &&
|
|
lhs.recvType == rhs.recvType &&
|
|
lhs.branchCode == rhs.branchCode &&
|
|
lhs.recvAddress == rhs.recvAddress &&
|
|
lhs.recvZipCode == rhs.recvZipCode &&
|
|
lhs.recvPhoneNumber == rhs.recvPhoneNumber &&
|
|
lhs.recvName == rhs.recvName &&
|
|
lhs.orderStatus == rhs.orderStatus &&
|
|
lhs.createdDate == rhs.createdDate &&
|
|
lhs.modifiedDate == rhs.modifiedDate &&
|
|
lhs.recvDate == rhs.recvDate &&
|
|
lhs.branchName == rhs.branchName
|
|
}
|
|
}
|