/** * Insert lot * * @param Lot $model * @return int|null */ public function insert(Lot $model) { return $this->fpdo->insertInto($this->table, array('client_system_account_id' => $model->getClientSystemAccountId(), 'security_id' => $model->getSecurityId(), 'initial_lot_id' => $model->getInitialLotId(), 'quantity' => $model->getQuantity(), 'amount' => $model->getAmount(), 'status' => $model->getStatus(), 'cost_basis' => $model->getCostBasis(), 'was_closed' => $model->getWasClosed(), 'realized_gain_loss' => $model->getRealizedGain(), 'date' => $model->getDate(), 'position_id' => $model->getPositionId(), 'is_cost_basis_known' => false, 'is_wash_sale' => false, 'was_rebalancer_diff' => $model->getWasRebalancerDiff()))->execute(); }