//
//  ContactBestseller.swift
//  iPOS
//
//  Created by BBC on 29/06/17.
//  Copyright © 2017 BBC. All rights reserved.
//

import Foundation
import ObjectMapper

class ContactBestseller: Mappable{
    var contactId: String?
    var productFamilyName: String?
    var productFamilyId: Int?
    var quantity: Double?
    var salesNetValue: Double?
    var createTime: Int?
    
    required init?(map: Map){
        
    }
    
    init(){
        
    }
    
    func mapping(map: Map) {
        contactId <- map["ContactId"]
        productFamilyName <- map["ProductFamilyName"]
        productFamilyId <- map["ProductFamilyId"]
        quantity <- (map["Quantity"], Util.CustomDoubleTransform())
        salesNetValue <- (map["SalesNetValue"], Util.CustomDoubleTransform())
        createTime <- map["CreateTime"]
    }
    
    func clone() -> ContactBestseller{
        let clone = ContactBestseller()
        clone.contactId = self.contactId
        clone.productFamilyName = self.productFamilyName
        clone.productFamilyId = self.productFamilyId
        clone.quantity = self.quantity
        clone.salesNetValue = self.salesNetValue
        clone.createTime = self.createTime
        return clone
    }
}
