Viewing file: Cobranca.php (3.24 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* Cobranca
*
* Classe modelo para utilização do Doctrine
*
* @property serial $id
* @property string $codigo
* @property string $nossoNumero
* @property string $dataVencimento
* @property string $dataPagamento
* @property string $dataGeracao
* @property string $horaGeracao
* @property string $valor
* @property string $status
* @property integer $insId
* @property Inscricao $inscricao
* @property string $linhaDigitavel
*
* @package application
* @subpackage model
* @author iMAXIS
*/
class Cobranca extends Doctrine_Record
{
/**
* Define os tipos de campos a serem utilizados para manutenção da tabela no banco de dados
* Para cada campo é preciso ter uma variável definida com o mesmo nome.<br>
* Ex: para o campo via_email as email deve haver uma variável chamada $email adicionada <br>
* nas linhas iniciais da classe como @property type $email(ex)
*
* @return void
*/
public function setTableDefinition()
{
$this->setTableName('site_cobranca');
$this->hasColumn('cob_id as id', 'serial', null, array(
'type' => 'serial',
'primary' => true,
));
$this->hasColumn('cob_codigo as codigo', 'string', 100, array(
'type' => 'string',
'length' => '150',
));
$this->hasColumn('cob_datavencimento as dataVencimento', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('cob_datageracao as dataGeracao', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('cob_datapagamento as dataPagamento', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('cob_horageracao as horaGeracao', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('cob_valor as valor', 'double precision', null, array(
'type' => 'double precision',
));
$this->hasColumn('cob_status as status', 'string', 1, array(
'type' => 'string',
'length' => '1',
));
$this->hasColumn('cob_nossonumero as nossoNumero', 'string', 100, array(
'type' => 'string',
'length' => '100',
));
$this->hasColumn('ins_id as insId', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('cob_linhadigitavel as linhaDigitavel', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('cob_url as url', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('cob_id_gateway as idGateway', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
}
/**
* Seta os relacionamentos da classe atual
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->hasOne('Inscricao as inscricao', array(
'local' => 'ins_id',
'foreign' => 'ins_id'));
}
}
|