Viewing file: CadastroEmail.php (2.33 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* CadastroEmail
*
* Classe modelo para utilização do Doctrine
*
* @property serial $id
* @property string $nome
* @property string $email
* @property string $telefone
* @property string $veiculoTipo
* @property string $veiculoNome
* @property string $cidade
* @property Date $dtCadastro
* @property string $tipo
*
* @package application
* @subpackage model
* @author iMAXIS
*/
class CadastroEmail 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 usr_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_cadastro_email');
$this->hasColumn('cde_id as id', 'serial', null, array(
'type' => 'serial',
'primary' => true,
));
$this->hasColumn('cde_nome as nome', 'string', 255, array(
'type' => 'string',
'length' => '150',
));
$this->hasColumn('cde_email as email', 'string', 50, array(
'type' => 'string',
'length' => '50',
));
$this->hasColumn('cde_telefone as telefone', 'string', 15, array(
'type' => 'string',
'length' => '15',
));
$this->hasColumn('cde_veiculo_tipo as veiculoTipo', 'string', 15, array(
'type' => 'string',
'length' => '15',
));
$this->hasColumn('cde_veiculo_nome as veiculoNome', 'string', 50, array(
'type' => 'string',
'length' => '50',
));
$this->hasColumn('cde_cidade as cidade', 'string', 50, array(
'type' => 'string',
'length' => '50',
));
$this->hasColumn('cde_tipo as tipo', 'string', 10, array(
'type' => 'string',
'length' => '10',
));
$this->hasColumn('cde_dt_cadastro as dtCadastro', 'date', null, array(
'type' => 'date',
));
}
}
|