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

/**
 * BaseRH_AP_PLANTA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_planta
 * @property integer $id_clasi_p
 * @property integer $id_clase_p
 * @property timestamp $fecha_i
 * @property timestamp $fecha_f
 * @property integer $n_cargos
 * @property string $comentario
 * @property integer $id_norma
 * @property integer $id_orden
 * @property decimal $id_tipo_p
 * @property string $dependencia
 * @property string $superior_i
 * @property NORMAS $NORMAS
 * @property RH_AP_CLASI_P $RH_AP_CLASI_P
 * @property RH_AP_TIPO_P $RH_AP_TIPO_P
 * @property RH_PN_CLASE_PLANTA $RH_PN_CLASE_PLANTA
 * @property Doctrine_Collection $RH_AP_DEN_EMP
 * 
 * @method integer             getIdPlanta()           Returns the current record's "id_planta" value
 * @method integer             getIdClasiP()           Returns the current record's "id_clasi_p" value
 * @method integer             getIdClaseP()           Returns the current record's "id_clase_p" value
 * @method timestamp           getFechaI()             Returns the current record's "fecha_i" value
 * @method timestamp           getFechaF()             Returns the current record's "fecha_f" value
 * @method integer             getNCargos()            Returns the current record's "n_cargos" value
 * @method string              getComentario()         Returns the current record's "comentario" value
 * @method integer             getIdNorma()            Returns the current record's "id_norma" value
 * @method integer             getIdOrden()            Returns the current record's "id_orden" value
 * @method decimal             getIdTipoP()            Returns the current record's "id_tipo_p" value
 * @method string              getDependencia()        Returns the current record's "dependencia" value
 * @method string              getSuperiorI()          Returns the current record's "superior_i" value
 * @method NORMAS              getNORMAS()             Returns the current record's "NORMAS" value
 * @method RH_AP_CLASI_P       getRHAPCLASIP()         Returns the current record's "RH_AP_CLASI_P" value
 * @method RH_AP_TIPO_P        getRHAPTIPOP()          Returns the current record's "RH_AP_TIPO_P" value
 * @method RH_PN_CLASE_PLANTA  getRHPNCLASEPLANTA()    Returns the current record's "RH_PN_CLASE_PLANTA" value
 * @method Doctrine_Collection getRHAPDENEMP()         Returns the current record's "RH_AP_DEN_EMP" collection
 * @method RH_AP_PLANTA        setIdPlanta()           Sets the current record's "id_planta" value
 * @method RH_AP_PLANTA        setIdClasiP()           Sets the current record's "id_clasi_p" value
 * @method RH_AP_PLANTA        setIdClaseP()           Sets the current record's "id_clase_p" value
 * @method RH_AP_PLANTA        setFechaI()             Sets the current record's "fecha_i" value
 * @method RH_AP_PLANTA        setFechaF()             Sets the current record's "fecha_f" value
 * @method RH_AP_PLANTA        setNCargos()            Sets the current record's "n_cargos" value
 * @method RH_AP_PLANTA        setComentario()         Sets the current record's "comentario" value
 * @method RH_AP_PLANTA        setIdNorma()            Sets the current record's "id_norma" value
 * @method RH_AP_PLANTA        setIdOrden()            Sets the current record's "id_orden" value
 * @method RH_AP_PLANTA        setIdTipoP()            Sets the current record's "id_tipo_p" value
 * @method RH_AP_PLANTA        setDependencia()        Sets the current record's "dependencia" value
 * @method RH_AP_PLANTA        setSuperiorI()          Sets the current record's "superior_i" value
 * @method RH_AP_PLANTA        setNORMAS()             Sets the current record's "NORMAS" value
 * @method RH_AP_PLANTA        setRHAPCLASIP()         Sets the current record's "RH_AP_CLASI_P" value
 * @method RH_AP_PLANTA        setRHAPTIPOP()          Sets the current record's "RH_AP_TIPO_P" value
 * @method RH_AP_PLANTA        setRHPNCLASEPLANTA()    Sets the current record's "RH_PN_CLASE_PLANTA" value
 * @method RH_AP_PLANTA        setRHAPDENEMP()         Sets the current record's "RH_AP_DEN_EMP" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRH_AP_PLANTA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_AP_PLANTA');
        $this->hasColumn('id_planta', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_clasi_p', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_clase_p', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_i', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_f', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('n_cargos', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('comentario', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('id_norma', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_orden', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_p', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('dependencia', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('superior_i', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('adjunto', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        
    }

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

        $this->hasOne('RH_AP_CLASI_P', array(
             'local' => 'id_clasi_p',
             'foreign' => 'id_cla_pla'));

        $this->hasOne('RH_AP_TIPO_P', array(
             'local' => 'id_tipo_p',
             'foreign' => 'id_tip_pla'));

        $this->hasOne('RH_PN_CLASE_PLANTA', array(
             'local' => 'id_clase_p',
             'foreign' => 'id_clase_pla'));

        $this->hasMany('RH_AP_DEN_EMP', array(
             'local' => 'id_planta',
             'foreign' => 'id_planta_p'));
    }
}