<?php

/**
 * BaseProjectActivity
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int                                  $activityId                                Type: integer(4), primary key
 * @property int                                  $projectId                                 Type: integer(4)
 * @property int                                  $is_deleted                                Type: integer(1), default "0"
 * @property string                               $name                                      Type: string(110)
 * @property Project                              $Project                                   
 * @property Doctrine_Collection|TimesheetItem[]  $TimesheetItem                             
 *  
 * @method int                                    getActivityid()                            Type: integer(4), primary key
 * @method int                                    getProjectid()                             Type: integer(4)
 * @method int                                    getIsDeleted()                             Type: integer(1), default "0"
 * @method string                                 getName()                                  Type: string(110)
 * @method Project                                getProject()                               
 * @method Doctrine_Collection|TimesheetItem[]    getTimesheetItem()                         
 *  
 * @method ProjectActivity                        setActivityid(int $val)                    Type: integer(4), primary key
 * @method ProjectActivity                        setProjectid(int $val)                     Type: integer(4)
 * @method ProjectActivity                        setIsDeleted(int $val)                     Type: integer(1), default "0"
 * @method ProjectActivity                        setName(string $val)                       Type: string(110)
 * @method ProjectActivity                        setProject(Project $val)                   
 * @method ProjectActivity                        setTimesheetItem(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 BaseProjectActivity extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_project_activity');
        $this->hasColumn('activity_id as activityId', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             'length' => 4,
             ));
        $this->hasColumn('project_id as projectId', 'integer', 4, array(
             'type' => 'integer',
             'notnull' => true,
             'length' => 4,
             ));
        $this->hasColumn('is_deleted', 'integer', 1, array(
             'type' => 'integer',
             'default' => '0',
             'length' => 1,
             ));
        $this->hasColumn('name', 'string', 110, array(
             'type' => 'string',
             'length' => 110,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Project', array(
             'local' => 'project_id',
             'foreign' => 'project_id'));

        $this->hasMany('TimesheetItem', array(
             'local' => 'activity_id',
             'foreign' => 'activityId'));
    }
}