<?php

class Sistema_Model_AgendamentoFerias extends Agro_Db_Table_Abstract {
    protected $_schema = 'sistema';
    protected $_name = 'agendamento_ferias';
    protected $_primary = 'id';
    public $_order = 'id_funcionario';

    public function save($data) {
        $Row = $this->getRow($data['id']);

        $Row->id_funcionario = $data['id_funcionario'];
        $Row->data_inicio = Agro_Util::formatDate($data['data_inicio'], Zend_Date::W3C);
        $Row->data_final = Agro_Util::formatDate($data['data_final'], Zend_Date::W3C);

        return $Row->save();
    }
}
