Viewing file: Revista.php (2.28 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* Revista
*
* Classe modelo para utilização do Doctrine
*
* @property int $id
* @property string $titulo
* @property integer $anoRevista
* @property integer $anoEdicao
* @property integer $mesEdicao
* @property date $dtCadastro
* @property date $dataExpiracao
* @property string $imagem
* @property integer $numero
* @property string $arquivo
* @property Doctrine_Collection $paginas
*
* @package application
* @subpackage model
* @author iMAXIS
*/
class Revista 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_revistas');
$this->hasColumn('rev_id as id', 'int', null, array(
'type' => 'int',
'primary' => true,
));
$this->hasColumn('rev_titulo as titulo', 'string', 255, array(
'type' => 'string',
'length' => '100',
));
$this->hasColumn('rev_ano as anoRevista', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('rev_ano_edicao as anoEdicao', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('rev_mes_edicao as mesEdicao', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('rev_numero as numero', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('rev_data as dtCadastro', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('rev_imagem as imagem', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('rev_arquivo as arquivo', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
}
}
|