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

/**
 * BasePR_NUME_INGRE
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property integer $id_tipo_ingre
 * @property integer $id_grupo_ingre
 * @property integer $id_nivel_ingre
 * @property string $vigencia
 * @property PR_GRUPO_INGRE $PR_GRUPO_INGRE
 * @property PR_NIVEL_INGRE $PR_NIVEL_INGRE
 * @property PR_TIPO_INGRE $PR_TIPO_INGRE
 * @property Doctrine_Collection $TS_GI
 * 
 * @method integer             getId()             Returns the current record's "id" value
 * @method string              getCodigo()         Returns the current record's "codigo" value
 * @method string              getDescripcion()    Returns the current record's "descripcion" value
 * @method integer             getIdTipoIngre()    Returns the current record's "id_tipo_ingre" value
 * @method integer             getIdGrupoIngre()   Returns the current record's "id_grupo_ingre" value
 * @method integer             getIdNivelIngre()   Returns the current record's "id_nivel_ingre" value
 * @method string              getVigencia()       Returns the current record's "vigencia" value
 * @method PR_GRUPO_INGRE      getPRGRUPOINGRE()   Returns the current record's "PR_GRUPO_INGRE" value
 * @method PR_NIVEL_INGRE      getPRNIVELINGRE()   Returns the current record's "PR_NIVEL_INGRE" value
 * @method PR_TIPO_INGRE       getPRTIPOINGRE()    Returns the current record's "PR_TIPO_INGRE" value
 * @method Doctrine_Collection getTSGI()           Returns the current record's "TS_GI" collection
 * @method PR_NUME_INGRE       setId()             Sets the current record's "id" value
 * @method PR_NUME_INGRE       setCodigo()         Sets the current record's "codigo" value
 * @method PR_NUME_INGRE       setDescripcion()    Sets the current record's "descripcion" value
 * @method PR_NUME_INGRE       setIdTipoIngre()    Sets the current record's "id_tipo_ingre" value
 * @method PR_NUME_INGRE       setIdGrupoIngre()   Sets the current record's "id_grupo_ingre" value
 * @method PR_NUME_INGRE       setIdNivelIngre()   Sets the current record's "id_nivel_ingre" value
 * @method PR_NUME_INGRE       setVigencia()       Sets the current record's "vigencia" value
 * @method PR_NUME_INGRE       setPRGRUPOINGRE()   Sets the current record's "PR_GRUPO_INGRE" value
 * @method PR_NUME_INGRE       setPRNIVELINGRE()   Sets the current record's "PR_NIVEL_INGRE" value
 * @method PR_NUME_INGRE       setPRTIPOINGRE()    Sets the current record's "PR_TIPO_INGRE" value
 * @method PR_NUME_INGRE       setTSGI()           Sets the current record's "TS_GI" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_NUME_INGRE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_NUME_INGRE');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 3, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 3,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('id_tipo_ingre', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_grupo_ingre', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_nivel_ingre', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('vigencia', 'string', 4, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
    }

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

        $this->hasOne('PR_NIVEL_INGRE', array(
             'local' => 'id_nivel_ingre',
             'foreign' => 'id'));

        $this->hasOne('PR_TIPO_INGRE', array(
             'local' => 'id_tipo_ingre',
             'foreign' => 'id'));

        $this->hasMany('TS_GI', array(
             'local' => 'id',
             'foreign' => 'id_pr_nume_ingre'));
    }
}