Viewing file: Newsletter.php (2.23 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* NewSletter
*
* Classe modelo para utilização do Doctrine
* @property integer $id
* @property string $titulo
* @property text $conteudo
* @property date $dataCadastro
* @property string $anexo01
* @property string $anexo02
* @property string $anexo03
* @property string $destinatarios
* @package app
* @subpackage model
* @author iMAXIS
*/
class Newsletter 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_newsletter');
$this->hasColumn('new_id as id', 'integer', null, array(
'type' => 'integer',
'primary' => true,
));
$this->hasColumn('new_titulo as titulo', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('new_conteudo as conteudo', 'text', null, array(
'type' => 'text',
));
$this->hasColumn('new_data_cadastro as dtCadastro', 'date', null, array(
'type' => 'date',
));
$this->hasColumn('new_anexo01 as anexo01', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('new_anexo02 as anexo02', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('new_anexo03 as anexo03', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
$this->hasColumn('new_tipoenvio as tipoEnvio', 'string', 1, array(
'type' => 'string',
'length' => '1',
));
$this->hasColumn('new_destinatarios as destinatarios', 'string', 255, array(
'type' => 'string',
'length' => '255',
));
}
}
|