Skip to content

Instantly share code, notes, and snippets.

@kirkegaard
Created March 24, 2010 20:40
Show Gist options
  • Select an option

  • Save kirkegaard/342763 to your computer and use it in GitHub Desktop.

Select an option

Save kirkegaard/342763 to your computer and use it in GitHub Desktop.
<?php
/**
* Model_Base_Page
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $id
* @property integer $author_id
* @property boolean $isPublished
* @property boolean $isRoot
* @property integer $parent
* @property string $title
* @property clob $content
* @property Model_User $Author
*
* @package 1kid
* @subpackage Models
* @author Christian Kirkegaard <christian@art-box.dk>
* @version SVN: $Id: Builder.php 6820 2009-11-30 17:27:49Z jwage $
*/
abstract class Model_Base_Page extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('page');
$this->hasColumn('id', 'integer', null, array(
'type' => 'integer',
'primary' => true,
'autoincrement' => true,
));
$this->hasColumn('author_id', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('isPublished', 'boolean', null, array(
'type' => 'boolean',
));
$this->hasColumn('isRoot', 'boolean', null, array(
'type' => 'boolean',
));
$this->hasColumn('parent', 'integer', null, array(
'type' => 'integer',
));
$this->hasColumn('title', 'string', 100, array(
'type' => 'string',
'length' => '100',
));
$this->hasColumn('content', 'clob', null, array(
'type' => 'clob',
));
$this->option('type', 'INNODB');
$this->option('collate', 'utf8_general_ci');
$this->option('charset', 'utf8');
}
public function setUp()
{
parent::setUp();
$this->hasOne('Model_User as Author', array(
'local' => 'author_id',
'foreign' => 'id'));
$sluggable0 = new Doctrine_Template_Sluggable(array(
'unique' => true,
'fields' =>
array(
0 => 'title',
),
'canUpdate' => true,
));
$timestampable0 = new Doctrine_Template_Timestampable(array(
'created' =>
array(
'name' => 'date_created',
),
'updated' =>
array(
'name' => 'date_modified',
),
));
$this->actAs($sluggable0);
$this->actAs($timestampable0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment