<?php

/**
 * BaseReportTo
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $supervisorId
 * @property integer $subordinateId
 * @property integer $reportingMethodId
 * @property Employee $supervisor
 * @property Employee $subordinate
 * @property ReportingMethod $ReportingMethod
 * 
 * @method integer         getSupervisorId()      Returns the current record's "supervisorId" value
 * @method integer         getSubordinateId()     Returns the current record's "subordinateId" value
 * @method integer         getReportingMethodId() Returns the current record's "reportingMethodId" value
 * @method Employee        getSupervisor()        Returns the current record's "supervisor" value
 * @method Employee        getSubordinate()       Returns the current record's "subordinate" value
 * @method ReportingMethod getReportingMethod()   Returns the current record's "ReportingMethod" value
 * @method ReportTo        setSupervisorId()      Sets the current record's "supervisorId" value
 * @method ReportTo        setSubordinateId()     Sets the current record's "subordinateId" value
 * @method ReportTo        setReportingMethodId() Sets the current record's "reportingMethodId" value
 * @method ReportTo        setSupervisor()        Sets the current record's "supervisor" value
 * @method ReportTo        setSubordinate()       Sets the current record's "subordinate" value
 * @method ReportTo        setReportingMethod()   Sets the current record's "ReportingMethod" value
 * 
 * @package    orangehrm
 * @subpackage model\pim\base
 * @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'));
    }
}