<?php

/**
 * BaseJobTitle
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $jobTitleName
 * @property string $jobDescription
 * @property string $note
 * @property integer $isDeleted
 * @property JobSpecificationAttachment $JobSpecificationAttachment
 * @property Doctrine_Collection $employees
 * @property Doctrine_Collection $definekpi
 * @property Doctrine_Collection $JobVacancy
 * @property SalaryGrade $SalaryGrade
 * @property Doctrine_Collection $DefineKpi
 * @property Doctrine_Collection $PerformanceReview
 * 
 * @method integer                    getId()                         Returns the current record's "id" value
 * @method string                     getJobTitleName()               Returns the current record's "jobTitleName" value
 * @method string                     getJobDescription()             Returns the current record's "jobDescription" value
 * @method string                     getNote()                       Returns the current record's "note" value
 * @method integer                    getIsDeleted()                  Returns the current record's "isDeleted" value
 * @method JobSpecificationAttachment getJobSpecificationAttachment() Returns the current record's "JobSpecificationAttachment" value
 * @method Doctrine_Collection        getEmployees()                  Returns the current record's "employees" collection
 * @method Doctrine_Collection        getDefinekpi()                  Returns the current record's "definekpi" collection
 * @method Doctrine_Collection        getJobVacancy()                 Returns the current record's "JobVacancy" collection
 * @method SalaryGrade                getSalaryGrade()                Returns the current record's "SalaryGrade" value
 * @method Doctrine_Collection        getDefineKpi()                  Returns the current record's "DefineKpi" collection
 * @method Doctrine_Collection        getPerformanceReview()          Returns the current record's "PerformanceReview" collection
 * @method JobTitle                   setId()                         Sets the current record's "id" value
 * @method JobTitle                   setJobTitleName()               Sets the current record's "jobTitleName" value
 * @method JobTitle                   setJobDescription()             Sets the current record's "jobDescription" value
 * @method JobTitle                   setNote()                       Sets the current record's "note" value
 * @method JobTitle                   setIsDeleted()                  Sets the current record's "isDeleted" value
 * @method JobTitle                   setJobSpecificationAttachment() Sets the current record's "JobSpecificationAttachment" value
 * @method JobTitle                   setEmployees()                  Sets the current record's "employees" collection
 * @method JobTitle                   setDefinekpi()                  Sets the current record's "definekpi" collection
 * @method JobTitle                   setJobVacancy()                 Sets the current record's "JobVacancy" collection
 * @method JobTitle                   setSalaryGrade()                Sets the current record's "SalaryGrade" value
 * @method JobTitle                   setDefineKpi()                  Sets the current record's "DefineKpi" collection
 * @method JobTitle                   setPerformanceReview()          Sets the current record's "PerformanceReview" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseJobTitle extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_job_title');
        $this->hasColumn('id', 'integer', 13, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             'length' => 13,
             ));
        $this->hasColumn('job_title as jobTitleName', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
        $this->hasColumn('job_description as jobDescription', 'string', 400, array(
             'type' => 'string',
             'length' => 400,
             ));
        $this->hasColumn('note', 'string', 400, array(
             'type' => 'string',
             'length' => 400,
             ));
        $this->hasColumn('is_deleted as isDeleted', 'integer', 1, array(
             'type' => 'integer',
             'default' => '0',
             'length' => 1,
             ));
    }

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

        $this->hasMany('Employee as employees', array(
             'local' => 'id',
             'foreign' => 'job_title_code'));

        $this->hasMany('DefineKpi as definekpi', array(
             'local' => 'id',
             'foreign' => 'job_title_code'));

        $this->hasMany('JobVacancy', array(
             'local' => 'id',
             'foreign' => 'jobTitleCode'));

        $this->hasOne('SalaryGrade', array(
             'local' => 'sal_grd_code',
             'foreign' => 'sal_grd_code'));

        $this->hasMany('DefineKpi', array(
             'local' => 'id',
             'foreign' => 'jobtitlecode'));

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