<?php

/**
 * BaseOperationalCountry
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                              $id                                    Type: integer(4), primary key
 * @property string                           $country_code                          Type: string(3)
 * @property Country                          $Country                               
 * @property Doctrine_Collection|LeaveType[]  $LeaveType                             
 * @property Doctrine_Collection|WorkWeek[]   $WorkWeek                              
 * @property Doctrine_Collection|Holiday[]    $Holiday                               
 *  
 * @method int                                getId()                                Type: integer(4), primary key
 * @method string                             getCountryCode()                       Type: string(3)
 * @method Country                            getCountry()                           
 * @method Doctrine_Collection|LeaveType[]    getLeaveType()                         
 * @method Doctrine_Collection|WorkWeek[]     getWorkWeek()                          
 * @method Doctrine_Collection|Holiday[]      getHoliday()                           
 *  
 * @method OperationalCountry                 setId(int $val)                        Type: integer(4), primary key
 * @method OperationalCountry                 setCountryCode(string $val)            Type: string(3)
 * @method OperationalCountry                 setCountry(Country $val)               
 * @method OperationalCountry                 setLeaveType(Doctrine_Collection $val) 
 * @method OperationalCountry                 setWorkWeek(Doctrine_Collection $val)  
 * @method OperationalCountry                 setHoliday(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 BaseOperationalCountry extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_operational_country');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'autoincrement' => true,
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('country_code', 'string', 3, array(
             'type' => 'string',
             'length' => 3,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Country', array(
             'local' => 'country_code',
             'foreign' => 'cou_code'));

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

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

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