<?php

/**
 * BaseJobVacancy
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                         $id                                               Type: integer(13), primary key
 * @property int                                         $jobTitleCode                                     Type: integer(13)
 * @property int                                         $hiringManagerId                                  Type: integer(13)
 * @property string                                      $name                                             Type: string(100)
 * @property text                                        $description                                      Type: text
 * @property int                                         $noOfPositions                                    Type: integer(13)
 * @property int                                         $status                                           Type: integer(4)
 * @property bool                                        $publishedInFeed                                  Type: boolean
 * @property string                                      $definedTime                                      Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @property string                                      $updatedTime                                      Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @property JobTitle                                    $JobTitle                                         
 * @property Employee                                    $Employee                                         
 * @property Doctrine_Collection|JobCandidateVacancy[]   $JobCandidateVacancy                              
 * @property Doctrine_Collection|JobVacancyAttachment[]  $JobVacancyAttachment                             
 * @property Doctrine_Collection|CandidateHistory[]      $CandidateHistory                                 
 *  
 * @method int                                           getId()                                           Type: integer(13), primary key
 * @method int                                           getJobtitlecode()                                 Type: integer(13)
 * @method int                                           getHiringmanagerid()                              Type: integer(13)
 * @method string                                        getName()                                         Type: string(100)
 * @method text                                          getDescription()                                  Type: text
 * @method int                                           getNoofpositions()                                Type: integer(13)
 * @method int                                           getStatus()                                       Type: integer(4)
 * @method bool                                          getPublishedinfeed()                              Type: boolean
 * @method string                                        getDefinedtime()                                  Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @method string                                        getUpdatedtime()                                  Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @method JobTitle                                      getJobTitle()                                     
 * @method Employee                                      getEmployee()                                     
 * @method Doctrine_Collection|JobCandidateVacancy[]     getJobCandidateVacancy()                          
 * @method Doctrine_Collection|JobVacancyAttachment[]    getJobVacancyAttachment()                         
 * @method Doctrine_Collection|CandidateHistory[]        getCandidateHistory()                             
 *  
 * @method JobVacancy                                    setId(int $val)                                   Type: integer(13), primary key
 * @method JobVacancy                                    setJobtitlecode(int $val)                         Type: integer(13)
 * @method JobVacancy                                    setHiringmanagerid(int $val)                      Type: integer(13)
 * @method JobVacancy                                    setName(string $val)                              Type: string(100)
 * @method JobVacancy                                    setDescription(text $val)                         Type: text
 * @method JobVacancy                                    setNoofpositions(int $val)                        Type: integer(13)
 * @method JobVacancy                                    setStatus(int $val)                               Type: integer(4)
 * @method JobVacancy                                    setPublishedinfeed(bool $val)                     Type: boolean
 * @method JobVacancy                                    setDefinedtime(string $val)                       Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @method JobVacancy                                    setUpdatedtime(string $val)                       Type: datetime, Date and time in ISO-8601 format (YYYY-MM-DD HH:MI)
 * @method JobVacancy                                    setJobTitle(JobTitle $val)                        
 * @method JobVacancy                                    setEmployee(Employee $val)                        
 * @method JobVacancy                                    setJobCandidateVacancy(Doctrine_Collection $val)  
 * @method JobVacancy                                    setJobVacancyAttachment(Doctrine_Collection $val) 
 * @method JobVacancy                                    setCandidateHistory(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 BaseJobVacancy extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_job_vacancy');
        $this->hasColumn('id', 'integer', 13, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 13,
             ));
        $this->hasColumn('job_title_code as jobTitleCode', 'integer', 13, array(
             'type' => 'integer',
             'length' => 13,
             ));
        $this->hasColumn('hiring_manager_id as hiringManagerId', 'integer', 13, array(
             'type' => 'integer',
             'length' => 13,
             ));
        $this->hasColumn('name', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
        $this->hasColumn('description', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('no_of_positions as noOfPositions', 'integer', 13, array(
             'type' => 'integer',
             'length' => 13,
             ));
        $this->hasColumn('status', 'integer', 4, array(
             'type' => 'integer',
             'length' => 4,
             ));
        $this->hasColumn('published_in_feed as publishedInFeed', 'boolean', null, array(
             'type' => 'boolean',
             ));
        $this->hasColumn('defined_time as definedTime', 'datetime', null, array(
             'type' => 'datetime',
             ));
        $this->hasColumn('updated_time as updatedTime', 'datetime', null, array(
             'type' => 'datetime',
             ));
    }

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

        $this->hasOne('Employee', array(
             'local' => 'hiringManagerId',
             'foreign' => 'empNumber'));

        $this->hasMany('JobCandidateVacancy', array(
             'local' => 'id',
             'foreign' => 'vacancyId'));

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

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