<?php

/**
 * BaseGroupField
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                        $groupFieldId                                    Type: integer, primary key
 * @property string                                     $name                                            Type: string(255)
 * @property string                                     $groupByClause                                   Type: clob
 * @property string                                     $groupFieldWidget                                Type: string(255)
 * @property Doctrine_Collection|AvailableGroupField[]  $AvailableGroupField                             
 * @property Doctrine_Collection|SelectedGroupField[]   $SelectedGroupField                              
 *  
 * @method int                                          getGroupfieldid()                                Type: integer, primary key
 * @method string                                       getName()                                        Type: string(255)
 * @method string                                       getGroupbyclause()                               Type: clob
 * @method string                                       getGroupfieldwidget()                            Type: string(255)
 * @method Doctrine_Collection|AvailableGroupField[]    getAvailableGroupField()                         
 * @method Doctrine_Collection|SelectedGroupField[]     getSelectedGroupField()                          
 *  
 * @method GroupField                                   setGroupfieldid(int $val)                        Type: integer, primary key
 * @method GroupField                                   setName(string $val)                             Type: string(255)
 * @method GroupField                                   setGroupbyclause(string $val)                    Type: clob
 * @method GroupField                                   setGroupfieldwidget(string $val)                 Type: string(255)
 * @method GroupField                                   setAvailableGroupField(Doctrine_Collection $val) 
 * @method GroupField                                   setSelectedGroupField(Doctrine_Collection $val)  
 *  
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseGroupField extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_group_field');
        $this->hasColumn('group_field_id as groupFieldId', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('group_by_clause as groupByClause', 'clob', null, array(
             'type' => 'clob',
             'notnull' => true,
             ));
        $this->hasColumn('group_field_widget as groupFieldWidget', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
    }

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

        $this->hasMany('SelectedGroupField', array(
             'local' => 'groupFieldId',
             'foreign' => 'group_field_id'));
    }
}