<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('Page', 'doctrine');

/**
 * BasePage
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property string $body
 * @property string $ebody
 * @property integer $is_visible
 * 
 * @method integer getId()         Returns the current record's "id" value
 * @method string  getName()       Returns the current record's "name" value
 * @method string  getBody()       Returns the current record's "body" value
 * @method string  getEbody()      Returns the current record's "ebody" value
 * @method integer getIsVisible()  Returns the current record's "is_visible" value
 * @method Page    setId()         Sets the current record's "id" value
 * @method Page    setName()       Sets the current record's "name" value
 * @method Page    setBody()       Sets the current record's "body" value
 * @method Page    setEbody()      Sets the current record's "ebody" value
 * @method Page    setIsVisible()  Sets the current record's "is_visible" value
 * 
 * @package    mongolcom
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BasePage extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('page');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => 4,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('body', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('ebody', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('is_visible', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
    }

     public function setUp()
    {
        parent::setUp();
		 $this->hasOne('Category', array(
             'local' => 'is_visible',
             'foreign' => 'id'));
        
    }
}