<?php

/**
 * BaseWorkShift
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property decimal $hoursPerDay
 * @property Doctrine_Collection $EmployeeWorkShift
 * 
 * @method integer             getId()                Returns the current record's "id" value
 * @method string              getName()              Returns the current record's "name" value
 * @method decimal             getHoursPerDay()       Returns the current record's "hoursPerDay" value
 * @method Doctrine_Collection getEmployeeWorkShift() Returns the current record's "EmployeeWorkShift" collection
 * @method WorkShift           setId()                Sets the current record's "id" value
 * @method WorkShift           setName()              Sets the current record's "name" value
 * @method WorkShift           setHoursPerDay()       Sets the current record's "hoursPerDay" 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('ohrm_work_shift');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('name', 'string', 260, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 260,
             ));
        $this->hasColumn('hours_per_day as hoursPerDay', 'decimal', 4, array(
             'type' => 'decimal',
             'notnull' => true,
             'scale' => false,
             'length' => 4,
             ));
    }

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