<?php

/**
 * BaseReportTo
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int              $supervisorId                            Type: integer(4), primary key
 * @property int              $subordinateId                           Type: integer(4), primary key
 * @property int              $reportingMethodId                       Type: integer(4), primary key
 * @property Employee         $supervisor                              
 * @property Employee         $subordinate                             
 * @property ReportingMethod  $ReportingMethod                         
 *  
 * @method int                getSupervisorid()                        Type: integer(4), primary key
 * @method int                getSubordinateid()                       Type: integer(4), primary key
 * @method int                getReportingmethodid()                   Type: integer(4), primary key
 * @method Employee           getSupervisor()                          
 * @method Employee           getSubordinate()                         
 * @method ReportingMethod    getReportingMethod()                     
 *  
 * @method ReportTo           setSupervisorid(int $val)                Type: integer(4), primary key
 * @method ReportTo           setSubordinateid(int $val)               Type: integer(4), primary key
 * @method ReportTo           setReportingmethodid(int $val)           Type: integer(4), primary key
 * @method ReportTo           setSupervisor(Employee $val)             
 * @method ReportTo           setSubordinate(Employee $val)            
 * @method ReportTo           setReportingMethod(ReportingMethod $val) 
 *  
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseReportTo extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('hs_hr_emp_reportto');
        $this->hasColumn('erep_sup_emp_number as supervisorId', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('erep_sub_emp_number as subordinateId', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('erep_reporting_mode as reportingMethodId', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Employee as supervisor', array(
             'local' => 'erep_sup_emp_number',
             'foreign' => 'emp_number'));

        $this->hasOne('Employee as subordinate', array(
             'local' => 'erep_sub_emp_number',
             'foreign' => 'emp_number'));

        $this->hasOne('ReportingMethod', array(
             'local' => 'reportingMethodId',
             'foreign' => 'id'));
    }
}