<?php

/**
 * BaseWorkShift
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                      $id                                            Type: integer, primary key
 * @property string                                   $name                                          Type: string(260)
 * @property float                                    $hoursPerDay                                   Type: decimal(4)
 * @property string                                   $start_time                                    Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @property string                                   $end_time                                      Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @property Doctrine_Collection|EmployeeWorkShift[]  $EmployeeWorkShift                             
 *  
 * @method int                                        getId()                                        Type: integer, primary key
 * @method string                                     getName()                                      Type: string(260)
 * @method float                                      getHoursperday()                               Type: decimal(4)
 * @method string                                     getStartTime()                                 Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @method string                                     getEndTime()                                   Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @method Doctrine_Collection|EmployeeWorkShift[]    getEmployeeWorkShift()                         
 *  
 * @method WorkShift                                  setId(int $val)                                Type: integer, primary key
 * @method WorkShift                                  setName(string $val)                           Type: string(260)
 * @method WorkShift                                  setHoursperday(float $val)                     Type: decimal(4)
 * @method WorkShift                                  setStartTime(string $val)                      Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @method WorkShift                                  setEndTime(string $val)                        Type: time, Time in ISO-8601 format (HH:MI:SS)
 * @method WorkShift                                  setEmployeeWorkShift(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 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'));
    }
}