//
//  StoreDayClosesFiscalDayMoneyMovements.swift
//  iPOS
//
//  Created by bbc on 10/10/2017.
//  Copyright © 2017 BBC. All rights reserved.
//

import Foundation
import ObjectMapper

class StoreDayClosesFiscalDayMoneyMovements : Mappable{
    var moneyMovementId: UUID
    var storeId: Int!
    var cashRegister: Int!
    var createTime: Date!
    var causeAccountantKeyId: Int!
    var sourceAccountantKeyId: Int!
    var destinationAccountantKeyId: Int!
    var posPaymentTypeId: Int!
    var amount: Double!
    var userId: UUID
    var notes: String!
    var causeCode: String!
    var posPaymentTypeCode: String!
    var code: String!
    var movementType: String!
    
    
    required init?(map: Map){
        moneyMovementId = UUID.init()
        userId = UUID.init()
    }
    
    func mapping(map: Map) {
        moneyMovementId <- (map["MoneyMovementId"], Util.CustomUuidTransform())
        userId <- (map["UserId"], Util.CustomUuidTransform())
        storeId <- map["StoreId"]
        cashRegister <- map["CashRegister"]
        createTime <- map["CreateTime"]
        causeCode <- map["CauseCode"]
        causeAccountantKeyId <- map["CauseAccountantKeyId"]
        sourceAccountantKeyId <- map["SourceAccountantKeyId"]
        destinationAccountantKeyId <- map["DestinationAccountantKeyId"]
        posPaymentTypeId <- map["PosPaymentTypeId"]
        amount <- map["Amount"]
        notes <- map["Notes"]
        posPaymentTypeCode <- map["PosPaymentTypeCode"]
        code <- map["Code"]
        movementType <- map["MovementType"]
    }
}
