<?php

/**
 * BaseDisplayFieldGroup
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                              $id                                                    Type: integer, primary key
 * @property int                                              $report_group_id                                       Type: integer
 * @property string                                           $name                                                  Type: string(255)
 * @property bool                                             $is_list                                               Type: boolean
 * @property ReportGroup                                      $ReportGroup                                           
 * @property Doctrine_Collection|AbstractDisplayField[]       $AbstractDisplayField                                  
 * @property Doctrine_Collection|SelectedDisplayFieldGroup[]  $SelectedDisplayFieldGroup                             
 *  
 * @method int                                                getId()                                                Type: integer, primary key
 * @method int                                                getReportGroupId()                                     Type: integer
 * @method string                                             getName()                                              Type: string(255)
 * @method bool                                               getIsList()                                            Type: boolean
 * @method ReportGroup                                        getReportGroup()                                       
 * @method Doctrine_Collection|AbstractDisplayField[]         getAbstractDisplayField()                              
 * @method Doctrine_Collection|SelectedDisplayFieldGroup[]    getSelectedDisplayFieldGroup()                         
 *  
 * @method DisplayFieldGroup                                  setId(int $val)                                        Type: integer, primary key
 * @method DisplayFieldGroup                                  setReportGroupId(int $val)                             Type: integer
 * @method DisplayFieldGroup                                  setName(string $val)                                   Type: string(255)
 * @method DisplayFieldGroup                                  setIsList(bool $val)                                   Type: boolean
 * @method DisplayFieldGroup                                  setReportGroup(ReportGroup $val)                       
 * @method DisplayFieldGroup                                  setAbstractDisplayField(Doctrine_Collection $val)      
 * @method DisplayFieldGroup                                  setSelectedDisplayFieldGroup(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 BaseDisplayFieldGroup extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_display_field_group');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'unsigned' => true,
             'primary' => true,
             ));
        $this->hasColumn('report_group_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('is_list', 'boolean', null, array(
             'type' => 'boolean',
             'notnull' => true,
             'default' => false,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('ReportGroup', array(
             'local' => 'report_group_id',
             'foreign' => 'reportGroupId',
             'onDelete' => 'cascade'));

        $this->hasMany('AbstractDisplayField', array(
             'local' => 'id',
             'foreign' => 'display_field_group_id'));

        $this->hasMany('SelectedDisplayFieldGroup', array(
             'local' => 'id',
             'foreign' => 'display_field_group_id'));
    }
}