<?php

/**
 * BaseKpi
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                   $id                                         Type: integer(6), primary key
 * @property string                                $jobTitleCode                               Type: string(10)
 * @property string                                $kpi_indicators                             Type: varchar(255)
 * @property int                                   $min_rating                                 Type: integer(11)
 * @property int                                   $max_rating                                 Type: integer(11)
 * @property int                                   $default_kpi                                Type: integer(2)
 * @property JobTitle                              $JobTitle                                   
 * @property Doctrine_Collection|ReviewerRating[]  $ReviewerRating                             
 *  
 * @method int                                     getId()                                     Type: integer(6), primary key
 * @method string                                  getJobtitlecode()                           Type: string(10)
 * @method string                                  getKpiIndicators()                          Type: varchar(255)
 * @method int                                     getMinRating()                              Type: integer(11)
 * @method int                                     getMaxRating()                              Type: integer(11)
 * @method int                                     getDefaultKpi()                             Type: integer(2)
 * @method JobTitle                                getJobTitle()                               
 * @method Doctrine_Collection|ReviewerRating[]    getReviewerRating()                         
 *  
 * @method Kpi                                     setId(int $val)                             Type: integer(6), primary key
 * @method Kpi                                     setJobtitlecode(string $val)                Type: string(10)
 * @method Kpi                                     setKpiIndicators(string $val)               Type: varchar(255)
 * @method Kpi                                     setMinRating(int $val)                      Type: integer(11)
 * @method Kpi                                     setMaxRating(int $val)                      Type: integer(11)
 * @method Kpi                                     setDefaultKpi(int $val)                     Type: integer(2)
 * @method Kpi                                     setJobTitle(JobTitle $val)                  
 * @method Kpi                                     setReviewerRating(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 BaseKpi extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_kpi');
        $this->hasColumn('id', 'integer', 6, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             'length' => 6,
             ));
        $this->hasColumn('job_title_code as jobTitleCode', 'string', 10, array(
             'type' => 'string',
             'length' => 10,
             ));
        $this->hasColumn('kpi_indicators', 'varchar', 255, array(
             'type' => 'varchar',
             'length' => 255,
             ));
        $this->hasColumn('min_rating', 'integer', 11, array(
             'type' => 'integer',
             'length' => 11,
             ));
        $this->hasColumn('max_rating', 'integer', 11, array(
             'type' => 'integer',
             'length' => 11,
             ));
        $this->hasColumn('default_kpi', 'integer', 2, array(
             'type' => 'integer',
             'length' => 2,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('JobTitle', array(
             'local' => 'jobTitleCode',
             'foreign' => 'id'));

        $this->hasMany('ReviewerRating', array(
             'local' => 'id',
             'foreign' => 'kpi_id'));

        $softdelete0 = new Doctrine_Template_SoftDelete(array(
             ));
        $this->actAs($softdelete0);
    }
}