<?php

class Sistema_Model_Tipostatus extends Agro_Db_Table_Abstract
{
    public const CORRETOR = 'CORRETOR';
    public const DS_CHAVE_CADASTRO_VISTORIADORES = 'CADASTRO_VISTORIADORES';
    public const DS_CHAVE_LAUDOS_PRELIMINARES = 'LAUDOS_PRELIMINARES';
    public const DS_CHAVE_LF = 'LF';
    public const DS_CHAVE_PR = 'PR';
    public const DS_CHAVE_SUBVENCAO = 'SUBVENCAO';
    public const DS_CHAVE_VP_STATUS_ALTERACAO = 'VP_STATUS_ALTERACAO';
    public const DS_CHAVE_VP_ANALISE = 'VP_ANALISE';

    public const PR = 1;
    public const SOLICITACOES_ENDOSSO = 17;
    public const ASSINATURA_ELETRONICA = 37;

    protected $_schema = 'sistema';
    protected $_name = 'tipo_status';
    protected $_primary = 'id';

    public function save(array $data)
    {
        $row = $this->getRow($data['id']);

        $row->ds_tipo_status = $data['ds_tipo_status'];
        $row->ds_chave = $data['ds_chave'];

        return $row->save();
    }
}