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

/**
 * BaseRE_OBLIGACION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_obligacion
 * @property integer $id_distribucion
 * @property integer $id_liq
 * @property integer $id_mae_ter
 * @property timestamp $fecha_crea
 * @property integer $valor_contraprestacion
 * @property integer $id_ach
 * @property integer $estado
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property INTERCEROS $INTERCEROS
 * @property RE_DISTRIBUCION $RE_DISTRIBUCION
 * @property RE_LIQUIDACION $RE_LIQUIDACION
 * @property Doctrine_Collection $RE_OBL_DETALLE
 * @property Doctrine_Collection $RE_OBL_DETALLE_5
 * @property Doctrine_Collection $RE_OBL_DETALLE_6
 * @property Doctrine_Collection $RE_OBL_DETALLE_7
 * 
 * @method integer             getIdObligacion()           Returns the current record's "id_obligacion" value
 * @method integer             getIdDistribucion()         Returns the current record's "id_distribucion" value
 * @method integer             getIdLiq()                  Returns the current record's "id_liq" value
 * @method integer             getIdMaeTer()               Returns the current record's "id_mae_ter" value
 * @method timestamp           getFechaCrea()              Returns the current record's "fecha_crea" value
 * @method integer             getValorContraprestacion()  Returns the current record's "valor_contraprestacion" value
 * @method integer             getIdAch()                  Returns the current record's "id_ach" value
 * @method integer             getEstado()                 Returns the current record's "estado" value
 * @method timestamp           getFechaAnu()               Returns the current record's "fecha_anu" value
 * @method string              getMotivoAnu()              Returns the current record's "motivo_anu" value
 * @method INTERCEROS          getINTERCEROS()             Returns the current record's "INTERCEROS" value
 * @method RE_DISTRIBUCION     getREDISTRIBUCION()         Returns the current record's "RE_DISTRIBUCION" value
 * @method RE_LIQUIDACION      getRELIQUIDACION()          Returns the current record's "RE_LIQUIDACION" value
 * @method Doctrine_Collection getREOBLDETALLE()           Returns the current record's "RE_OBL_DETALLE" collection
 * @method Doctrine_Collection getREOBLDETALLE5()          Returns the current record's "RE_OBL_DETALLE_5" collection
 * @method Doctrine_Collection getREOBLDETALLE6()          Returns the current record's "RE_OBL_DETALLE_6" collection
 * @method Doctrine_Collection getREOBLDETALLE7()          Returns the current record's "RE_OBL_DETALLE_7" collection
 * @method RE_OBLIGACION       setIdObligacion()           Sets the current record's "id_obligacion" value
 * @method RE_OBLIGACION       setIdDistribucion()         Sets the current record's "id_distribucion" value
 * @method RE_OBLIGACION       setIdLiq()                  Sets the current record's "id_liq" value
 * @method RE_OBLIGACION       setIdMaeTer()               Sets the current record's "id_mae_ter" value
 * @method RE_OBLIGACION       setFechaCrea()              Sets the current record's "fecha_crea" value
 * @method RE_OBLIGACION       setValorContraprestacion()  Sets the current record's "valor_contraprestacion" value
 * @method RE_OBLIGACION       setIdAch()                  Sets the current record's "id_ach" value
 * @method RE_OBLIGACION       setEstado()                 Sets the current record's "estado" value
 * @method RE_OBLIGACION       setFechaAnu()               Sets the current record's "fecha_anu" value
 * @method RE_OBLIGACION       setMotivoAnu()              Sets the current record's "motivo_anu" value
 * @method RE_OBLIGACION       setINTERCEROS()             Sets the current record's "INTERCEROS" value
 * @method RE_OBLIGACION       setREDISTRIBUCION()         Sets the current record's "RE_DISTRIBUCION" value
 * @method RE_OBLIGACION       setRELIQUIDACION()          Sets the current record's "RE_LIQUIDACION" value
 * @method RE_OBLIGACION       setREOBLDETALLE()           Sets the current record's "RE_OBL_DETALLE" collection
 * @method RE_OBLIGACION       setREOBLDETALLE5()          Sets the current record's "RE_OBL_DETALLE_5" collection
 * @method RE_OBLIGACION       setREOBLDETALLE6()          Sets the current record's "RE_OBL_DETALLE_6" collection
 * @method RE_OBLIGACION       setREOBLDETALLE7()          Sets the current record's "RE_OBL_DETALLE_7" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_OBLIGACION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_OBLIGACION');
        $this->hasColumn('id_obligacion', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_distribucion', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_liq', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_mae_ter', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_crea', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('valor_contraprestacion', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_ach', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_anu', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('motivo_anu', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
    }

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

        $this->hasOne('RE_DISTRIBUCION', array(
             'local' => 'id_distribucion',
             'foreign' => 'id_distribucion'));

        $this->hasOne('RE_LIQUIDACION', array(
             'local' => 'id_liq',
             'foreign' => 'id_liq'));

        $this->hasMany('RE_OBL_DETALLE', array(
             'local' => 'id_obligacion',
             'foreign' => 'id_obligacion'));

        $this->hasMany('RE_OBL_DETALLE as RE_OBL_DETALLE_5', array(
             'local' => 'id_obligacion',
             'foreign' => 'id_distribucion'));

        $this->hasMany('RE_OBL_DETALLE as RE_OBL_DETALLE_6', array(
             'local' => 'id_distribucion',
             'foreign' => 'id_obligacion'));

        $this->hasMany('RE_OBL_DETALLE as RE_OBL_DETALLE_7', array(
             'local' => 'id_distribucion',
             'foreign' => 'id_distribucion'));
    }
}