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

/**
 * BaseRE_T_CONTRAPRESTACION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_tipo_con
 * @property integer $cod_tipo_con
 * @property string $descripcion
 * @property integer $estado
 * @property Doctrine_Collection $TS_DIS_REG
 * @property Doctrine_Collection $RE_DISTRIBUCION
 * 
 * @method integer               getIdTipoCon()       Returns the current record's "id_tipo_con" value
 * @method integer               getCodTipoCon()      Returns the current record's "cod_tipo_con" value
 * @method string                getDescripcion()     Returns the current record's "descripcion" value
 * @method integer               getEstado()          Returns the current record's "estado" value
 * @method Doctrine_Collection   getTSDISREG()        Returns the current record's "TS_DIS_REG" collection
 * @method Doctrine_Collection   getREDISTRIBUCION()  Returns the current record's "RE_DISTRIBUCION" collection
 * @method RE_T_CONTRAPRESTACION setIdTipoCon()       Sets the current record's "id_tipo_con" value
 * @method RE_T_CONTRAPRESTACION setCodTipoCon()      Sets the current record's "cod_tipo_con" value
 * @method RE_T_CONTRAPRESTACION setDescripcion()     Sets the current record's "descripcion" value
 * @method RE_T_CONTRAPRESTACION setEstado()          Sets the current record's "estado" value
 * @method RE_T_CONTRAPRESTACION setTSDISREG()        Sets the current record's "TS_DIS_REG" collection
 * @method RE_T_CONTRAPRESTACION setREDISTRIBUCION()  Sets the current record's "RE_DISTRIBUCION" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_T_CONTRAPRESTACION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_T_CONTRAPRESTACION');
        $this->hasColumn('id_tipo_con', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('cod_tipo_con', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 300, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 300,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 8,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('TS_DIS_REG', array(
             'local' => 'id_tipo_con',
             'foreign' => 'id_t_ctr'));

        $this->hasMany('RE_DISTRIBUCION', array(
             'local' => 'id_tipo_con',
             'foreign' => 'id_tipo_con'));
    }
}