<?php

class Solicitacao_Model_TarefaAndamentoArquivos extends Agro_Db_Table_Abstract {
    protected $_schema = 'solicitacao';
    protected $_name = 'tarefa_andamento_arquivos';
    protected $_primary = 'id';
    public $_order = 'dt_criacao desc';

    public function save($data) {

        $Row = $this->createRow();

        $Row->id_andamento = $data['id_andamento'];
        $Row->ds_nome_arquivo = $data['ds_nome_arquivo'];
        return $Row->save();
    }
    
    public function getArquivos($idAndamento) {
        $Arquivos = $this->fetchAll("id_andamento = $idAndamento", "ds_nome_arquivo")->toArray();
        return $Arquivos;
    }
}
