<?php

/**
 * BasePayGrade
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                     $id                                           Type: integer, primary key
 * @property string                                  $name                                         Type: string(60)
 * @property Doctrine_Collection|EmployeeSalary[]    $EmployeeSalary                               
 * @property Doctrine_Collection|PayGradeCurrency[]  $PayGradeCurrency                             
 *  
 * @method int                                       getId()                                       Type: integer, primary key
 * @method string                                    getName()                                     Type: string(60)
 * @method Doctrine_Collection|EmployeeSalary[]      getEmployeeSalary()                           
 * @method Doctrine_Collection|PayGradeCurrency[]    getPayGradeCurrency()                         
 *  
 * @method PayGrade                                  setId(int $val)                               Type: integer, primary key
 * @method PayGrade                                  setName(string $val)                          Type: string(60)
 * @method PayGrade                                  setEmployeeSalary(Doctrine_Collection $val)   
 * @method PayGrade                                  setPayGradeCurrency(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 BasePayGrade extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_pay_grade');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('name', 'string', 60, array(
             'type' => 'string',
             'length' => 60,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('EmployeeSalary', array(
             'local' => 'id',
             'foreign' => 'payGradeId'));

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