Viewing file: Contato.php (4.18 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* ContatoBkp
*
* Classe modelo para utilização do Doctrine
* @property integer $id
* @property integer $perfilDr
* @property integer $oficiosDr
* @property string $descricao
* @property string $cpf
* @property string $rg
* @property string $tabeliao
* @property string $obs
* @property date $nascimento
* @property string $fax
* @property string $email2
* @property integer $dddCelular
* @property string $ddd
* @property string $ativoSn
* @property string $associadoSn
* @property string $email
* @property string $fone
* @property string $ramal
* @property integer $ddd2
* @property string $fone2
* @property string $celular
* @property string $tipo
* @package app
* @subpackage model
* @author iMAXIS
*/
class Contato 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('contatos');
$this->hasColumn('CON_RowID as id', 'integer', null, array(
'type' => 'integer',
'primary' => true,
));
$this->hasColumn('CON_Perfil_DR as perfilDr', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('CON_Oficios_DR as oficiosDr', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('CON_Descricao as descricao', 'string', 50, array(
'type' => 'string',
));
$this->hasColumn('CON_CPF as cpf', 'string', 14, array(
'type' => 'string',
));
$this->hasColumn('CON_RG as rg', 'string', 14, array(
'type' => 'string',
));
$this->hasColumn('CON_Tabeliao as tabeliao', 'string', 1, array(
'type' => 'string',
));
$this->hasColumn('CON_Email as email', 'string', 50, array(
'type' => 'string',
));
$this->hasColumn('CON_Email2 as email2', 'string', 50, array(
'type' => 'string',
));
$this->hasColumn('CON_DDD as ddd', 'string', 3, array(
'type' => 'string',
));
$this->hasColumn('CON_Fone as fone', 'string', 15, array(
'type' => 'string',
));
$this->hasColumn('CON_Ramal as ramal', 'string', 5, array(
'type' => 'string',
));
$this->hasColumn('CON_DDD2 as ddd2', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('CON_Fone2 as fone2', 'string', 15, array(
'type' => 'string',
));
$this->hasColumn('CON_Fax as fax', 'string', 15, array(
'type' => 'string',
));
$this->hasColumn('CON_Obs as obs', 'string', 255, array(
'type' => 'string',
));
$this->hasColumn('CON_DDDCelular as dddcelular', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('CON_Celular as celular', 'string', 15, array(
'type' => 'string',
));
$this->hasColumn('CON_Nascimento as nascimento', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('CON_AssociadoSN as associadoSn', 'string', 1, array(
'type' => 'string',
));
$this->hasColumn('CON_AtivoSN as ativoSn', 'string', 1, array(
'type' => 'string',
));
}
/**
* Seta os relacionamentos da classe atual
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->hasOne('Oficio as oficio', array(
'local' => 'CON_Oficios_DR',
'foreign' => 'OFI_RowID'));
}
}
|