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

/**
 * BasePREGUNTA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_pregunta
 * @property string $codigo
 * @property integer $id_formato
 * @property integer $id_subcategoria
 * @property string $pregunta
 * @property integer $id_categoria
 * @property CATEGORIA $CATEGORIA
 * @property FORMATO $FORMATO
 * @property SUBCATEGORIA $SUBCATEGORIA
 * @property Doctrine_Collection $RH_EN_FORMATO_RESPUESTA
 * 
 * @method integer             getIdPregunta()              Returns the current record's "id_pregunta" value
 * @method string              getCodigo()                  Returns the current record's "codigo" value
 * @method integer             getIdFormato()               Returns the current record's "id_formato" value
 * @method integer             getIdSubcategoria()          Returns the current record's "id_subcategoria" value
 * @method string              getPregunta()                Returns the current record's "pregunta" value
 * @method integer             getIdCategoria()             Returns the current record's "id_categoria" value
 * @method CATEGORIA           getCATEGORIA()               Returns the current record's "CATEGORIA" value
 * @method FORMATO             getFORMATO()                 Returns the current record's "FORMATO" value
 * @method SUBCATEGORIA        getSUBCATEGORIA()            Returns the current record's "SUBCATEGORIA" value
 * @method Doctrine_Collection getRHENFORMATORESPUESTA()    Returns the current record's "RH_EN_FORMATO_RESPUESTA" collection
 * @method PREGUNTA            setIdPregunta()              Sets the current record's "id_pregunta" value
 * @method PREGUNTA            setCodigo()                  Sets the current record's "codigo" value
 * @method PREGUNTA            setIdFormato()               Sets the current record's "id_formato" value
 * @method PREGUNTA            setIdSubcategoria()          Sets the current record's "id_subcategoria" value
 * @method PREGUNTA            setPregunta()                Sets the current record's "pregunta" value
 * @method PREGUNTA            setIdCategoria()             Sets the current record's "id_categoria" value
 * @method PREGUNTA            setCATEGORIA()               Sets the current record's "CATEGORIA" value
 * @method PREGUNTA            setFORMATO()                 Sets the current record's "FORMATO" value
 * @method PREGUNTA            setSUBCATEGORIA()            Sets the current record's "SUBCATEGORIA" value
 * @method PREGUNTA            setRHENFORMATORESPUESTA()    Sets the current record's "RH_EN_FORMATO_RESPUESTA" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePREGUNTA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PREGUNTA');
        $this->hasColumn('id_pregunta', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_formato', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_subcategoria', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('pregunta', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('id_categoria', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('FORMATO', array(
             'local' => 'id_formato',
             'foreign' => 'id_formato'));

        $this->hasOne('SUBCATEGORIA', array(
             'local' => 'id_subcategoria',
             'foreign' => 'id_subcategoria'));

        $this->hasMany('RH_EN_FORMATO_RESPUESTA', array(
             'local' => 'id_pregunta',
             'foreign' => 'id_pregunta'));
    }
}