<?php

/**
 * BaseDataGroupPermission
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                  $id                          Type: integer, primary key
 * @property int                  $userRoleId                  Type: integer
 * @property int                  $dataGroupId                 Type: integer
 * @property int                  $canRead                     Type: integer(1)
 * @property int                  $canCreate                   Type: integer(1)
 * @property int                  $canUpdate                   Type: integer(1)
 * @property int                  $canDelete                   Type: integer(1)
 * @property int                  $self                        Type: integer(1)
 * @property DataGroup            $DataGroup                   
 * @property UserRole             $UserRole                    
 *  
 * @method int                    getId()                      Type: integer, primary key
 * @method int                    getUserroleid()              Type: integer
 * @method int                    getDatagroupid()             Type: integer
 * @method int                    getCanread()                 Type: integer(1)
 * @method int                    getCancreate()               Type: integer(1)
 * @method int                    getCanupdate()               Type: integer(1)
 * @method int                    getCandelete()               Type: integer(1)
 * @method int                    getSelf()                    Type: integer(1)
 * @method DataGroup              getDataGroup()               
 * @method UserRole               getUserRole()                
 *  
 * @method DataGroupPermission    setId(int $val)              Type: integer, primary key
 * @method DataGroupPermission    setUserroleid(int $val)      Type: integer
 * @method DataGroupPermission    setDatagroupid(int $val)     Type: integer
 * @method DataGroupPermission    setCanread(int $val)         Type: integer(1)
 * @method DataGroupPermission    setCancreate(int $val)       Type: integer(1)
 * @method DataGroupPermission    setCanupdate(int $val)       Type: integer(1)
 * @method DataGroupPermission    setCandelete(int $val)       Type: integer(1)
 * @method DataGroupPermission    setSelf(int $val)            Type: integer(1)
 * @method DataGroupPermission    setDataGroup(DataGroup $val) 
 * @method DataGroupPermission    setUserRole(UserRole $val)   
 *  
 * @package    orangehrm
 * @subpackage model
 * @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'));
    }
}