<?php

/**
 * BaseFilterField
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                        $filterFieldId                                   Type: integer, primary key
 * @property int                                        $reportGroupId                                   Type: integer
 * @property string                                     $name                                            Type: string(255)
 * @property string                                     $whereClausePart                                 Type: clob
 * @property string                                     $filterFieldWidget                               Type: string(255)
 * @property int                                        $conditionNo                                     Type: integer
 * @property string                                     $required                                        Type: string(10)
 * @property ReportGroup                                $ReportGroup                                     
 * @property Doctrine_Collection|SelectedFilterField[]  $SelectedFilterField                             
 *  
 * @method int                                          getFilterfieldid()                               Type: integer, primary key
 * @method int                                          getReportgroupid()                               Type: integer
 * @method string                                       getName()                                        Type: string(255)
 * @method string                                       getWhereclausepart()                             Type: clob
 * @method string                                       getFilterfieldwidget()                           Type: string(255)
 * @method int                                          getConditionno()                                 Type: integer
 * @method string                                       getRequired()                                    Type: string(10)
 * @method ReportGroup                                  getReportGroup()                                 
 * @method Doctrine_Collection|SelectedFilterField[]    getSelectedFilterField()                         
 *  
 * @method FilterField                                  setFilterfieldid(int $val)                       Type: integer, primary key
 * @method FilterField                                  setReportgroupid(int $val)                       Type: integer
 * @method FilterField                                  setName(string $val)                             Type: string(255)
 * @method FilterField                                  setWhereclausepart(string $val)                  Type: clob
 * @method FilterField                                  setFilterfieldwidget(string $val)                Type: string(255)
 * @method FilterField                                  setConditionno(int $val)                         Type: integer
 * @method FilterField                                  setRequired(string $val)                         Type: string(10)
 * @method FilterField                                  setReportGroup(ReportGroup $val)                 
 * @method FilterField                                  setSelectedFilterField(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 BaseFilterField extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_filter_field');
        $this->hasColumn('filter_field_id as filterFieldId', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('report_group_id as reportGroupId', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('where_clause_part as whereClausePart', 'clob', null, array(
             'type' => 'clob',
             'notnull' => true,
             ));
        $this->hasColumn('filter_field_widget as filterFieldWidget', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
        $this->hasColumn('condition_no as conditionNo', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('required', 'string', 10, array(
             'type' => 'string',
             'notnull' => false,
             'length' => 10,
             ));
    }

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

        $this->hasMany('SelectedFilterField', array(
             'local' => 'filterFieldId',
             'foreign' => 'filter_field_id'));
    }
}