<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('RMN_COMPETENCIA', 'doctrine');

/**
 * BaseRMN_COMPETENCIA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_competencia
 * @property string $nombre
 * @property string $num_doc
 * @property integer $id_departamento
 * @property integer $activo
 * @property RMN_DEPARTAMENTO $RMN_DEPARTAMENTO
 * @property Doctrine_Collection $RMN_SOLICITUD
 * @property Doctrine_Collection $IN_TITULO_COMPETENCIA
 * @property Doctrine_Collection $CA_USUARIO_COMPETENCIA
 * @property Doctrine_Collection $CA_LIQ_CANON
 * 
 * @method integer             getIdCompetencia()          Returns the current record's "id_competencia" value
 * @method string              getNombre()                 Returns the current record's "nombre" value
 * @method string              getNumDoc()                 Returns the current record's "num_doc" value
 * @method integer             getIdDepartamento()         Returns the current record's "id_departamento" value
 * @method integer             getActivo()                 Returns the current record's "activo" value
 * @method RMN_DEPARTAMENTO    getRMNDEPARTAMENTO()        Returns the current record's "RMN_DEPARTAMENTO" value
 * @method Doctrine_Collection getRMNSOLICITUD()           Returns the current record's "RMN_SOLICITUD" collection
 * @method Doctrine_Collection getINTITULOCOMPETENCIA()    Returns the current record's "IN_TITULO_COMPETENCIA" collection
 * @method Doctrine_Collection getCAUSUARIOCOMPETENCIA()   Returns the current record's "CA_USUARIO_COMPETENCIA" collection
 * @method Doctrine_Collection getCALIQCANON()             Returns the current record's "CA_LIQ_CANON" collection
 * @method RMN_COMPETENCIA     setIdCompetencia()          Sets the current record's "id_competencia" value
 * @method RMN_COMPETENCIA     setNombre()                 Sets the current record's "nombre" value
 * @method RMN_COMPETENCIA     setNumDoc()                 Sets the current record's "num_doc" value
 * @method RMN_COMPETENCIA     setIdDepartamento()         Sets the current record's "id_departamento" value
 * @method RMN_COMPETENCIA     setActivo()                 Sets the current record's "activo" value
 * @method RMN_COMPETENCIA     setRMNDEPARTAMENTO()        Sets the current record's "RMN_DEPARTAMENTO" value
 * @method RMN_COMPETENCIA     setRMNSOLICITUD()           Sets the current record's "RMN_SOLICITUD" collection
 * @method RMN_COMPETENCIA     setINTITULOCOMPETENCIA()    Sets the current record's "IN_TITULO_COMPETENCIA" collection
 * @method RMN_COMPETENCIA     setCAUSUARIOCOMPETENCIA()   Sets the current record's "CA_USUARIO_COMPETENCIA" collection
 * @method RMN_COMPETENCIA     setCALIQCANON()             Sets the current record's "CA_LIQ_CANON" collection
 * 
 * @package    canon
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRMN_COMPETENCIA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RMN_COMPETENCIA');
        $this->hasColumn('id_competencia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('nombre', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('num_doc', 'string', 50, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 50,
             ));
        $this->hasColumn('id_departamento', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('activo', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('RMN_SOLICITUD', array(
             'local' => 'id_competencia',
             'foreign' => 'id_competencia'));

        $this->hasMany('IN_TITULO_COMPETENCIA', array(
             'local' => 'id_competencia',
             'foreign' => 'id_competencia'));

        $this->hasMany('CA_USUARIO_COMPETENCIA', array(
             'local' => 'id_competencia',
             'foreign' => 'id_competencia'));

        $this->hasMany('CA_LIQ_CANON', array(
             'local' => 'id_competencia',
             'foreign' => 'id_competencia'));
    }
}