<?php

/**
 * BaseUserGroup
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $userg_id
 * @property integer $userg_repdef
 * @property string $userg_name
 * @property Doctrine_Collection $EmployeeUsergroup
 * @property Doctrine_Collection $Users
 * @property Doctrine_Collection $ModuleRights
 * 
 * @method string              getUsergId()           Returns the current record's "userg_id" value
 * @method integer             getUsergRepdef()       Returns the current record's "userg_repdef" value
 * @method string              getUsergName()         Returns the current record's "userg_name" value
 * @method Doctrine_Collection getEmployeeUsergroup() Returns the current record's "EmployeeUsergroup" collection
 * @method Doctrine_Collection getUsers()             Returns the current record's "Users" collection
 * @method Doctrine_Collection getModuleRights()      Returns the current record's "ModuleRights" collection
 * @method UserGroup           setUsergId()           Sets the current record's "userg_id" value
 * @method UserGroup           setUsergRepdef()       Sets the current record's "userg_repdef" value
 * @method UserGroup           setUsergName()         Sets the current record's "userg_name" value
 * @method UserGroup           setEmployeeUsergroup() Sets the current record's "EmployeeUsergroup" collection
 * @method UserGroup           setUsers()             Sets the current record's "Users" collection
 * @method UserGroup           setModuleRights()      Sets the current record's "ModuleRights" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseUserGroup extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('hs_hr_user_group');
        $this->hasColumn('userg_id', 'string', 36, array(
             'type' => 'string',
             'primary' => true,
             'length' => 36,
             ));
        $this->hasColumn('userg_repdef', 'integer', 2, array(
             'type' => 'integer',
             'unsigned' => 1,
             'default' => '0',
             'length' => 2,
             ));
        $this->hasColumn('userg_name', 'string', 45, array(
             'type' => 'string',
             'length' => 45,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('EmployeeUsergroup', array(
             'local' => 'userg_id',
             'foreign' => 'userg_id'));

        $this->hasMany('Users', array(
             'local' => 'userg_id',
             'foreign' => 'userg_id'));

        $this->hasMany('ModuleRights', array(
             'local' => 'userg_id',
             'foreign' => 'userg_id'));
    }
}