1<?php 2 3/** 4 * BaseUserRole 5 * 6 * This class has been auto-generated by the Doctrine ORM Framework 7 * 8 * @property int $id Type: integer(4), primary key 9 * @property string $name Type: string(255) 10 * @property string $display_name Type: string(255) 11 * @property bool $is_assignable Type: boolean 12 * @property bool $is_predefined Type: boolean 13 * @property Doctrine_Collection|DataGroupPermission[] $DataGroupPermission 14 * @property Doctrine_Collection|SystemUser[] $SystemUser 15 * @property Doctrine_Collection|ScreenPermission[] $ScreenPermission 16 * @property Doctrine_Collection|HomePage[] $HomePage 17 * @property Doctrine_Collection|ModuleDefaultPage[] $ModuleDefaultPage 18 * 19 * @method int getId() Type: integer(4), primary key 20 * @method string getName() Type: string(255) 21 * @method string getDisplayName() Type: string(255) 22 * @method bool getIsAssignable() Type: boolean 23 * @method bool getIsPredefined() Type: boolean 24 * @method Doctrine_Collection|DataGroupPermission[] getDataGroupPermission() 25 * @method Doctrine_Collection|SystemUser[] getSystemUser() 26 * @method Doctrine_Collection|ScreenPermission[] getScreenPermission() 27 * @method Doctrine_Collection|HomePage[] getHomePage() 28 * @method Doctrine_Collection|ModuleDefaultPage[] getModuleDefaultPage() 29 * 30 * @method UserRole setId(int $val) Type: integer(4), primary key 31 * @method UserRole setName(string $val) Type: string(255) 32 * @method UserRole setDisplayName(string $val) Type: string(255) 33 * @method UserRole setIsAssignable(bool $val) Type: boolean 34 * @method UserRole setIsPredefined(bool $val) Type: boolean 35 * @method UserRole setDataGroupPermission(Doctrine_Collection $val) 36 * @method UserRole setSystemUser(Doctrine_Collection $val) 37 * @method UserRole setScreenPermission(Doctrine_Collection $val) 38 * @method UserRole setHomePage(Doctrine_Collection $val) 39 * @method UserRole setModuleDefaultPage(Doctrine_Collection $val) 40 * 41 * @package orangehrm 42 * @subpackage model 43 * @author Your name here 44 * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ 45 */ 46abstract class BaseUserRole extends sfDoctrineRecord 47{ 48 public function setTableDefinition() 49 { 50 $this->setTableName('ohrm_user_role'); 51 $this->hasColumn('id', 'integer', 4, array( 52 'type' => 'integer', 53 'primary' => true, 54 'autoincrement' => true, 55 'length' => 4, 56 )); 57 $this->hasColumn('name', 'string', 255, array( 58 'type' => 'string', 59 'notnull' => true, 60 'length' => 255, 61 )); 62 $this->hasColumn('display_name', 'string', 255, array( 63 'type' => 'string', 64 'notnull' => true, 65 'length' => 255, 66 )); 67 $this->hasColumn('is_assignable', 'boolean', null, array( 68 'type' => 'boolean', 69 'notnull' => true, 70 )); 71 $this->hasColumn('is_predefined', 'boolean', null, array( 72 'type' => 'boolean', 73 'notnull' => true, 74 )); 75 } 76 77 public function setUp() 78 { 79 parent::setUp(); 80 $this->hasMany('DataGroupPermission', array( 81 'local' => 'id', 82 'foreign' => 'user_role_id')); 83 84 $this->hasMany('SystemUser', array( 85 'local' => 'id', 86 'foreign' => 'user_role_id')); 87 88 $this->hasMany('ScreenPermission', array( 89 'local' => 'id', 90 'foreign' => 'user_role_id')); 91 92 $this->hasMany('HomePage', array( 93 'local' => 'id', 94 'foreign' => 'user_role_id')); 95 96 $this->hasMany('ModuleDefaultPage', array( 97 'local' => 'id', 98 'foreign' => 'user_role_id')); 99 } 100}