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

/**
 * BaseNORMAS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_normas
 * @property integer $tipo
 * @property string $codigo
 * @property timestamp $fecha
 * @property string $path
 * @property timestamp $fecha_f
 * @property timestamp $fecha_i
 * @property string $asunto
 * @property string $estado
 * @property integer $id_clasificacion
 * @property string $expedido
 * @property string $firma
 * @property TIPO_DE_NORMA $TIPO_DE_NORMA
 * @property Doctrine_Collection $RH_SA_SL
 * @property Doctrine_Collection $RH_SA_SL_3
 * @property Doctrine_Collection $RH_SA_NOMBRAMIENTO
 * @property Doctrine_Collection $RH_SA_NOMBRAMIENTO_3
 * @property Doctrine_Collection $RH_PN_AS
 * @property Doctrine_Collection $RH_MF_MF
 * @property Doctrine_Collection $RH_AP_PLANTA
 * @property Doctrine_Collection $PROCESO_NORMA
 * @property Doctrine_Collection $NORMAS_CLASIFICACION
 * 
 * @method integer             getIdNormas()             Returns the current record's "id_normas" value
 * @method integer             getTipo()                 Returns the current record's "tipo" value
 * @method string              getCodigo()               Returns the current record's "codigo" value
 * @method timestamp           getFecha()                Returns the current record's "fecha" value
 * @method string              getPath()                 Returns the current record's "path" value
 * @method timestamp           getFechaF()               Returns the current record's "fecha_f" value
 * @method timestamp           getFechaI()               Returns the current record's "fecha_i" value
 * @method string              getAsunto()               Returns the current record's "asunto" value
 * @method string              getEstado()               Returns the current record's "estado" value
 * @method integer             getIdClasificacion()      Returns the current record's "id_clasificacion" value
 * @method string              getExpedido()             Returns the current record's "expedido" value
 * @method string              getFirma()                Returns the current record's "firma" value
 * @method TIPO_DE_NORMA       getTIPODENORMA()          Returns the current record's "TIPO_DE_NORMA" value
 * @method Doctrine_Collection getRHSASL()               Returns the current record's "RH_SA_SL" collection
 * @method Doctrine_Collection getRHSASL3()              Returns the current record's "RH_SA_SL_3" collection
 * @method Doctrine_Collection getRHSANOMBRAMIENTO()     Returns the current record's "RH_SA_NOMBRAMIENTO" collection
 * @method Doctrine_Collection getRHSANOMBRAMIENTO3()    Returns the current record's "RH_SA_NOMBRAMIENTO_3" collection
 * @method Doctrine_Collection getRHPNAS()               Returns the current record's "RH_PN_AS" collection
 * @method Doctrine_Collection getRHMFMF()               Returns the current record's "RH_MF_MF" collection
 * @method Doctrine_Collection getRHAPPLANTA()           Returns the current record's "RH_AP_PLANTA" collection
 * @method Doctrine_Collection getPROCESONORMA()         Returns the current record's "PROCESO_NORMA" collection
 * @method Doctrine_Collection getNORMASCLASIFICACION()  Returns the current record's "NORMAS_CLASIFICACION" collection
 * @method NORMAS              setIdNormas()             Sets the current record's "id_normas" value
 * @method NORMAS              setTipo()                 Sets the current record's "tipo" value
 * @method NORMAS              setCodigo()               Sets the current record's "codigo" value
 * @method NORMAS              setFecha()                Sets the current record's "fecha" value
 * @method NORMAS              setPath()                 Sets the current record's "path" value
 * @method NORMAS              setFechaF()               Sets the current record's "fecha_f" value
 * @method NORMAS              setFechaI()               Sets the current record's "fecha_i" value
 * @method NORMAS              setAsunto()               Sets the current record's "asunto" value
 * @method NORMAS              setEstado()               Sets the current record's "estado" value
 * @method NORMAS              setIdClasificacion()      Sets the current record's "id_clasificacion" value
 * @method NORMAS              setExpedido()             Sets the current record's "expedido" value
 * @method NORMAS              setFirma()                Sets the current record's "firma" value
 * @method NORMAS              setTIPODENORMA()          Sets the current record's "TIPO_DE_NORMA" value
 * @method NORMAS              setRHSASL()               Sets the current record's "RH_SA_SL" collection
 * @method NORMAS              setRHSASL3()              Sets the current record's "RH_SA_SL_3" collection
 * @method NORMAS              setRHSANOMBRAMIENTO()     Sets the current record's "RH_SA_NOMBRAMIENTO" collection
 * @method NORMAS              setRHSANOMBRAMIENTO3()    Sets the current record's "RH_SA_NOMBRAMIENTO_3" collection
 * @method NORMAS              setRHPNAS()               Sets the current record's "RH_PN_AS" collection
 * @method NORMAS              setRHMFMF()               Sets the current record's "RH_MF_MF" collection
 * @method NORMAS              setRHAPPLANTA()           Sets the current record's "RH_AP_PLANTA" collection
 * @method NORMAS              setPROCESONORMA()         Sets the current record's "PROCESO_NORMA" collection
 * @method NORMAS              setNORMASCLASIFICACION()  Sets the current record's "NORMAS_CLASIFICACION" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseNORMAS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('NORMAS');
        $this->hasColumn('id_normas', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('tipo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('path', 'string', 2000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2000,
             ));
        $this->hasColumn('fecha_f', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_i', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('asunto', 'string', 2000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2000,
             ));
        $this->hasColumn('estado', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 1,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_clasificacion', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('expedido', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('firma', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
    }

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

        $this->hasMany('RH_SA_SL', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma1'));

        $this->hasMany('RH_SA_SL as RH_SA_SL_3', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma2'));

        $this->hasMany('RH_SA_NOMBRAMIENTO', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma1'));

        $this->hasMany('RH_SA_NOMBRAMIENTO as RH_SA_NOMBRAMIENTO_3', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma2'));

        $this->hasMany('RH_PN_AS', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma'));

        $this->hasMany('RH_MF_MF', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma'));

        $this->hasMany('RH_AP_PLANTA', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma'));

        $this->hasMany('PROCESO_NORMA', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma'));

        $this->hasMany('NORMAS_CLASIFICACION', array(
             'local' => 'id_normas',
             'foreign' => 'id_norma'));
    }
}