<?php

class Produto_Model_CondicoesPagamentoMunicipios extends Agro_Db_Table_Abstract {
	protected $_schema = 'produto';
	protected $_name = 'condicoes_pagamento_municipios';
	protected $_primary = array('id_condicao_pagamento', 'id_municipio');
	protected $_sequence = false;

	public function save(array $values) {
		$Row = $this->createRow();

		$Row->id_condicao_pagamento = $values['id_condicao_pagamento'];
		$Row->id_municipio = $values['id_municipio'];

		return $Row->save();
	}
    
	public function delete($idPagamento) {
		$this->_db->query("delete from produto.condicoes_pagamento_municipios where id_condicao_pagamento = $idPagamento");
	}
	
}