<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('SF_GUARD_PERMISSION', 'doctrine');

/**
 * BaseSF_GUARD_PERMISSION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property string $description
 * @property timestamp $created_at
 * @property timestamp $updated_at
 * @property Doctrine_Collection $SF_GUARD_USER_PERMISSION
 * @property Doctrine_Collection $SF_GUARD_GROUP_PERMISSION
 * 
 * @method integer             getId()                        Returns the current record's "id" value
 * @method string              getName()                      Returns the current record's "name" value
 * @method string              getDescription()               Returns the current record's "description" value
 * @method timestamp           getCreatedAt()                 Returns the current record's "created_at" value
 * @method timestamp           getUpdatedAt()                 Returns the current record's "updated_at" value
 * @method Doctrine_Collection getSFGUARDUSERPERMISSION()     Returns the current record's "SF_GUARD_USER_PERMISSION" collection
 * @method Doctrine_Collection getSFGUARDGROUPPERMISSION()    Returns the current record's "SF_GUARD_GROUP_PERMISSION" collection
 * @method SF_GUARD_PERMISSION setId()                        Sets the current record's "id" value
 * @method SF_GUARD_PERMISSION setName()                      Sets the current record's "name" value
 * @method SF_GUARD_PERMISSION setDescription()               Sets the current record's "description" value
 * @method SF_GUARD_PERMISSION setCreatedAt()                 Sets the current record's "created_at" value
 * @method SF_GUARD_PERMISSION setUpdatedAt()                 Sets the current record's "updated_at" value
 * @method SF_GUARD_PERMISSION setSFGUARDUSERPERMISSION()     Sets the current record's "SF_GUARD_USER_PERMISSION" collection
 * @method SF_GUARD_PERMISSION setSFGUARDGROUPPERMISSION()    Sets the current record's "SF_GUARD_GROUP_PERMISSION" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseSF_GUARD_PERMISSION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('SF_GUARD_PERMISSION');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 255,
             ));
        $this->hasColumn('description', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('created_at', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('updated_at', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('SF_GUARD_USER_PERMISSION', array(
             'local' => 'id',
             'foreign' => 'permission_id'));

        $this->hasMany('SF_GUARD_GROUP_PERMISSION', array(
             'local' => 'id',
             'foreign' => 'permission_id'));
    }
}