<?php

/**
 * BaseDataGroupPermission
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $userRoleId
 * @property integer $dataGroupId
 * @property integer $canRead
 * @property integer $canCreate
 * @property integer $canUpdate
 * @property integer $canDelete
 * @property integer $self
 * @property DataGroup $DataGroup
 * @property UserRole $UserRole
 * 
 * @method integer             getId()          Returns the current record's "id" value
 * @method integer             getUserRoleId()  Returns the current record's "userRoleId" value
 * @method integer             getDataGroupId() Returns the current record's "dataGroupId" value
 * @method integer             getCanRead()     Returns the current record's "canRead" value
 * @method integer             getCanCreate()   Returns the current record's "canCreate" value
 * @method integer             getCanUpdate()   Returns the current record's "canUpdate" value
 * @method integer             getCanDelete()   Returns the current record's "canDelete" value
 * @method integer             getSelf()        Returns the current record's "self" value
 * @method DataGroup           getDataGroup()   Returns the current record's "DataGroup" value
 * @method UserRole            getUserRole()    Returns the current record's "UserRole" value
 * @method DataGroupPermission setId()          Sets the current record's "id" value
 * @method DataGroupPermission setUserRoleId()  Sets the current record's "userRoleId" value
 * @method DataGroupPermission setDataGroupId() Sets the current record's "dataGroupId" value
 * @method DataGroupPermission setCanRead()     Sets the current record's "canRead" value
 * @method DataGroupPermission setCanCreate()   Sets the current record's "canCreate" value
 * @method DataGroupPermission setCanUpdate()   Sets the current record's "canUpdate" value
 * @method DataGroupPermission setCanDelete()   Sets the current record's "canDelete" value
 * @method DataGroupPermission setSelf()        Sets the current record's "self" value
 * @method DataGroupPermission setDataGroup()   Sets the current record's "DataGroup" value
 * @method DataGroupPermission setUserRole()    Sets the current record's "UserRole" value
 * 
 * @package    orangehrm
 * @subpackage model\core\base
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseDataGroupPermission extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_user_role_data_group');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('user_role_id as userRoleId', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('data_group_id as dataGroupId', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('can_read as canRead', 'integer', 1, array(
             'type' => 'integer',
             'length' => 1,
             ));
        $this->hasColumn('can_create as canCreate', 'integer', 1, array(
             'type' => 'integer',
             'length' => 1,
             ));
        $this->hasColumn('can_update as canUpdate', 'integer', 1, array(
             'type' => 'integer',
             'length' => 1,
             ));
        $this->hasColumn('can_delete as canDelete', 'integer', 1, array(
             'type' => 'integer',
             'length' => 1,
             ));
        $this->hasColumn('self as self', 'integer', 1, array(
             'type' => 'integer',
             'length' => 1,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('DataGroup', array(
             'local' => 'data_group_id',
             'foreign' => 'id'));

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