<?php

/**
 * BaseReportGroup
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                         $reportGroupId                                    Type: integer, primary key
 * @property string                                      $name                                             Type: string(255)
 * @property string                                      $core_sql                                         Type: clob
 * @property Doctrine_Collection|Report[]                $Report                                           
 * @property Doctrine_Collection|FilterField[]           $FilterField                                      
 * @property Doctrine_Collection|AbstractDisplayField[]  $AbstractDisplayField                             
 * @property Doctrine_Collection|AvailableGroupField[]   $AvailableGroupField                              
 * @property Doctrine_Collection|DisplayFieldGroup[]     $DisplayFieldGroup                                
 *  
 * @method int                                           getReportgroupid()                                Type: integer, primary key
 * @method string                                        getName()                                         Type: string(255)
 * @method string                                        getCoreSql()                                      Type: clob
 * @method Doctrine_Collection|Report[]                  getReport()                                       
 * @method Doctrine_Collection|FilterField[]             getFilterField()                                  
 * @method Doctrine_Collection|AbstractDisplayField[]    getAbstractDisplayField()                         
 * @method Doctrine_Collection|AvailableGroupField[]     getAvailableGroupField()                          
 * @method Doctrine_Collection|DisplayFieldGroup[]       getDisplayFieldGroup()                            
 *  
 * @method ReportGroup                                   setReportgroupid(int $val)                        Type: integer, primary key
 * @method ReportGroup                                   setName(string $val)                              Type: string(255)
 * @method ReportGroup                                   setCoreSql(string $val)                           Type: clob
 * @method ReportGroup                                   setReport(Doctrine_Collection $val)               
 * @method ReportGroup                                   setFilterField(Doctrine_Collection $val)          
 * @method ReportGroup                                   setAbstractDisplayField(Doctrine_Collection $val) 
 * @method ReportGroup                                   setAvailableGroupField(Doctrine_Collection $val)  
 * @method ReportGroup                                   setDisplayFieldGroup(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 BaseReportGroup extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_report_group');
        $this->hasColumn('report_group_id as reportGroupId', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('core_sql', 'clob', null, array(
             'type' => 'clob',
             'notnull' => true,
             ));
    }

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

        $this->hasMany('FilterField', array(
             'local' => 'reportGroupId',
             'foreign' => 'report_group_id'));

        $this->hasMany('AbstractDisplayField', array(
             'local' => 'reportGroupId',
             'foreign' => 'report_group_id'));

        $this->hasMany('AvailableGroupField', array(
             'local' => 'reportGroupId',
             'foreign' => 'report_group_id'));

        $this->hasMany('DisplayFieldGroup', array(
             'local' => 'reportGroupId',
             'foreign' => 'report_group_id'));
    }
}