<?php

/**
 * BaseScreenPermission
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $user_role_id
 * @property integer $screen_id
 * @property boolean $can_read
 * @property boolean $can_create
 * @property boolean $can_update
 * @property boolean $can_delete
 * @property UserRole $UserRole
 * @property Screen $Screen
 * 
 * @method integer          getId()           Returns the current record's "id" value
 * @method integer          getUserRoleId()   Returns the current record's "user_role_id" value
 * @method integer          getScreenId()     Returns the current record's "screen_id" value
 * @method boolean          getCanRead()      Returns the current record's "can_read" value
 * @method boolean          getCanCreate()    Returns the current record's "can_create" value
 * @method boolean          getCanUpdate()    Returns the current record's "can_update" value
 * @method boolean          getCanDelete()    Returns the current record's "can_delete" value
 * @method UserRole         getUserRole()     Returns the current record's "UserRole" value
 * @method Screen           getScreen()       Returns the current record's "Screen" value
 * @method ScreenPermission setId()           Sets the current record's "id" value
 * @method ScreenPermission setUserRoleId()   Sets the current record's "user_role_id" value
 * @method ScreenPermission setScreenId()     Sets the current record's "screen_id" value
 * @method ScreenPermission setCanRead()      Sets the current record's "can_read" value
 * @method ScreenPermission setCanCreate()    Sets the current record's "can_create" value
 * @method ScreenPermission setCanUpdate()    Sets the current record's "can_update" value
 * @method ScreenPermission setCanDelete()    Sets the current record's "can_delete" value
 * @method ScreenPermission setUserRole()     Sets the current record's "UserRole" value
 * @method ScreenPermission setScreen()       Sets the current record's "Screen" value
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseScreenPermission extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_user_role_screen');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('user_role_id', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('screen_id', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('can_read', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('can_create', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('can_update', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('can_delete', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
    }

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

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