<?php

/**
 * BaseWorkShift
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $workshift_id
 * @property string $name
 * @property decimal $hours_per_day
 * @property Doctrine_Collection $EmployeeWorkShift
 * 
 * @method integer             getWorkshiftId()       Returns the current record's "workshift_id" value
 * @method string              getName()              Returns the current record's "name" value
 * @method decimal             getHoursPerDay()       Returns the current record's "hours_per_day" value
 * @method Doctrine_Collection getEmployeeWorkShift() Returns the current record's "EmployeeWorkShift" collection
 * @method WorkShift           setWorkshiftId()       Sets the current record's "workshift_id" value
 * @method WorkShift           setName()              Sets the current record's "name" value
 * @method WorkShift           setHoursPerDay()       Sets the current record's "hours_per_day" value
 * @method WorkShift           setEmployeeWorkShift() Sets the current record's "EmployeeWorkShift" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseWorkShift extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('hs_hr_workshift');
        $this->hasColumn('workshift_id', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('name', 'string', 250, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 250,
             ));
        $this->hasColumn('hours_per_day', 'decimal', 4, array(
             'type' => 'decimal',
             'notnull' => true,
             'scale' => false,
             'length' => 4,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('EmployeeWorkShift', array(
             'local' => 'workshift_id',
             'foreign' => 'workshift_id'));
    }
}