<?php

/**
 * BaseWorkShift
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property decimal $hoursPerDay
 * @property time $start_time
 * @property time $end_time
 * @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 time                getStartTime()         Returns the current record's "start_time" value
 * @method time                getEndTime()           Returns the current record's "end_time" 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           setStartTime()         Sets the current record's "start_time" value
 * @method WorkShift           setEndTime()           Sets the current record's "end_time" value
 * @method WorkShift           setEmployeeWorkShift() Sets the current record's "EmployeeWorkShift" collection
 * 
 * @package    orangehrm
 * @subpackage model\admin\base
 * @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,
             ));
        $this->hasColumn('start_time', 'time', null, array(
             'type' => 'time',
             'notnull' => true,
             ));
        $this->hasColumn('end_time', 'time', null, array(
             'type' => 'time',
             'notnull' => 'true;',
             ));
    }

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