<?php

/**
 * BaseModule
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property integer $status
 * @property Doctrine_Collection $Screen
 * @property Doctrine_Collection $ModuleDefaultPage
 * 
 * @method integer             getId()                Returns the current record's "id" value
 * @method string              getName()              Returns the current record's "name" value
 * @method integer             getStatus()            Returns the current record's "status" value
 * @method Doctrine_Collection getScreen()            Returns the current record's "Screen" collection
 * @method Doctrine_Collection getModuleDefaultPage() Returns the current record's "ModuleDefaultPage" collection
 * @method Module              setId()                Sets the current record's "id" value
 * @method Module              setName()              Sets the current record's "name" value
 * @method Module              setStatus()            Sets the current record's "status" value
 * @method Module              setScreen()            Sets the current record's "Screen" collection
 * @method Module              setModuleDefaultPage() Sets the current record's "ModuleDefaultPage" 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 BaseModule extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_module');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('name', 'string', 120, array(
             'type' => 'string',
             'length' => 120,
             ));
        $this->hasColumn('status', 'integer', null, array(
             'type' => 'integer',
             ));
    }

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

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