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

/**
 * BaseSUBCATEGORIA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_subcategoria
 * @property string $nombre
 * @property string $descripcion
 * @property integer $id_categoria
 * @property CATEGORIA $CATEGORIA
 * @property Doctrine_Collection $PREGUNTA
 * 
 * @method integer             getIdSubcategoria()  Returns the current record's "id_subcategoria" value
 * @method string              getNombre()          Returns the current record's "nombre" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method integer             getIdCategoria()     Returns the current record's "id_categoria" value
 * @method CATEGORIA           getCATEGORIA()       Returns the current record's "CATEGORIA" value
 * @method Doctrine_Collection getPREGUNTA()        Returns the current record's "PREGUNTA" collection
 * @method SUBCATEGORIA        setIdSubcategoria()  Sets the current record's "id_subcategoria" value
 * @method SUBCATEGORIA        setNombre()          Sets the current record's "nombre" value
 * @method SUBCATEGORIA        setDescripcion()     Sets the current record's "descripcion" value
 * @method SUBCATEGORIA        setIdCategoria()     Sets the current record's "id_categoria" value
 * @method SUBCATEGORIA        setCATEGORIA()       Sets the current record's "CATEGORIA" value
 * @method SUBCATEGORIA        setPREGUNTA()        Sets the current record's "PREGUNTA" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseSUBCATEGORIA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('SUBCATEGORIA');
        $this->hasColumn('id_subcategoria', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('descripcion', 'string', 300, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 300,
             ));
        $this->hasColumn('id_categoria', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasMany('PREGUNTA', array(
             'local' => 'id_subcategoria',
             'foreign' => 'id_subcategoria'));
    }
}