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

/**
 * BaseSF_GUARD_USER_PERMISSION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $user_id
 * @property integer $permission_id
 * @property timestamp $created_at
 * @property timestamp $updated_at
 * @property SF_GUARD_PERMISSION $SF_GUARD_PERMISSION
 * @property SF_GUARD_USER $SF_GUARD_USER
 * 
 * @method integer                  getUserId()              Returns the current record's "user_id" value
 * @method integer                  getPermissionId()        Returns the current record's "permission_id" value
 * @method timestamp                getCreatedAt()           Returns the current record's "created_at" value
 * @method timestamp                getUpdatedAt()           Returns the current record's "updated_at" value
 * @method SF_GUARD_PERMISSION      getSFGUARDPERMISSION()   Returns the current record's "SF_GUARD_PERMISSION" value
 * @method SF_GUARD_USER            getSFGUARDUSER()         Returns the current record's "SF_GUARD_USER" value
 * @method SF_GUARD_USER_PERMISSION setUserId()              Sets the current record's "user_id" value
 * @method SF_GUARD_USER_PERMISSION setPermissionId()        Sets the current record's "permission_id" value
 * @method SF_GUARD_USER_PERMISSION setCreatedAt()           Sets the current record's "created_at" value
 * @method SF_GUARD_USER_PERMISSION setUpdatedAt()           Sets the current record's "updated_at" value
 * @method SF_GUARD_USER_PERMISSION setSFGUARDPERMISSION()   Sets the current record's "SF_GUARD_PERMISSION" value
 * @method SF_GUARD_USER_PERMISSION setSFGUARDUSER()         Sets the current record's "SF_GUARD_USER" value
 * 
 * @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_USER_PERMISSION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('SF_GUARD_USER_PERMISSION');
        $this->hasColumn('user_id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('permission_id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $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->hasOne('SF_GUARD_PERMISSION', array(
             'local' => 'permission_id',
             'foreign' => 'id'));

        $this->hasOne('SF_GUARD_USER', array(
             'local' => 'user_id',
             'foreign' => 'id'));
    }
}