<?php

/**
 * BaseScreen
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property integer $module_id
 * @property string $action_url
 * @property Module $Module
 * @property Doctrine_Collection $ScreenPermission
 * 
 * @method integer             getId()               Returns the current record's "id" value
 * @method string              getName()             Returns the current record's "name" value
 * @method integer             getModuleId()         Returns the current record's "module_id" value
 * @method string              getActionUrl()        Returns the current record's "action_url" value
 * @method Module              getModule()           Returns the current record's "Module" value
 * @method Doctrine_Collection getScreenPermission() Returns the current record's "ScreenPermission" collection
 * @method Screen              setId()               Sets the current record's "id" value
 * @method Screen              setName()             Sets the current record's "name" value
 * @method Screen              setModuleId()         Sets the current record's "module_id" value
 * @method Screen              setActionUrl()        Sets the current record's "action_url" value
 * @method Screen              setModule()           Sets the current record's "Module" value
 * @method Screen              setScreenPermission() Sets the current record's "ScreenPermission" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseScreen extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_screen');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('name', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
        $this->hasColumn('module_id', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('action_url', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
    }

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

        $this->hasMany('ScreenPermission', array(
             'local' => 'id',
             'foreign' => 'screen_id'));
    }
}