Viewing file: Inscricao.php (3.88 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* Inscricao
*
* Classe modelo para utilização do Doctrine
*
* @property int $id
* @property string $nome
* @property string $cpf
* @property string $cartorio
* @property date $dtInscricao
* @property string $endereco
* @property string $cidade
* @property string $uf
* @property string $cep
* @property string $telefone
* @property string $celular
* @property string $email
* @property insteger $evtId
* @property Evento $evento
* @property Cobranca $cobranca
*
* @package application
* @subpackage model
* @author iMAXIS
*/
class Inscricao 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 cli_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_inscricoes');
$this->hasColumn('ins_id as id', 'int', null, array(
'type' => 'int',
'primary' => true,
));
$this->hasColumn('ins_nome as nome', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('ins_cpf as cpf', 'string', 11, array(
'type' => 'string',
'length' => '11',
));
$this->hasColumn('ins_cartorio as cartorio', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('ins_cartorio_cnpj as cartorioCnpj', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('ins_endereco as endereco', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('ins_bairro as bairro', 'string', 100, array(
'type' => 'string',
'length' => '100',
));
$this->hasColumn('ins_cidade as cidade', 'string', 100, array(
'type' => 'string',
'length' => '100',
));
$this->hasColumn('ins_uf as uf', 'string', 2, array(
'type' => 'string',
'length' => '2',
));
$this->hasColumn('ins_cep as cep', 'string', 10, array(
'type' => 'string',
'length' => '10',
));
$this->hasColumn('ins_telefone as telefone', 'string', 15, array(
'type' => 'string',
'length' => '15',
));
$this->hasColumn('ins_celular as celular', 'string', 15, array(
'type' => 'string',
'length' => '15',
));
$this->hasColumn('ins_email as email', 'string', 150, array(
'type' => 'string',
'length' => '150',
));
$this->hasColumn('ins_data as dtInscricao', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('evt_id as evtId', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('ins_valor as valor', 'double precision', null, array(
'type' => 'double precision',
));
}
/**
* Seta os relacionamentos da classe atual
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->hasOne('Evento as evento', array(
'local' => 'evt_id',
'foreign' => 'evt_id'));
$this->hasOne('Cobranca as cobranca', array(
'local' => 'ins_id',
'foreign' => 'ins_id'));
}
}
|