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

/**
 * BaseCA_EXCEDENTES
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_excedente
 * @property integer $id_credito
 * @property decimal $valor
 * @property integer $en_uso
 * @property integer $id_credito_aplicado
 * @property integer $id_mae_ter
 * @property CA_CREDITO $CA_CREDITO
 * @property CA_CREDITO $CA_CREDITO_2
 * @property INTERCEROS $INTERCEROS
 * 
 * @method integer       getIdExcedente()         Returns the current record's "id_excedente" value
 * @method integer       getIdCredito()           Returns the current record's "id_credito" value
 * @method decimal       getValor()               Returns the current record's "valor" value
 * @method integer       getEnUso()               Returns the current record's "en_uso" value
 * @method integer       getIdCreditoAplicado()   Returns the current record's "id_credito_aplicado" value
 * @method integer       getIdMaeTer()            Returns the current record's "id_mae_ter" value
 * @method CA_CREDITO    getCACREDITO()           Returns the current record's "CA_CREDITO" value
 * @method CA_CREDITO    getCACREDITO2()          Returns the current record's "CA_CREDITO_2" value
 * @method INTERCEROS    getINTERCEROS()          Returns the current record's "INTERCEROS" value
 * @method CA_EXCEDENTES setIdExcedente()         Sets the current record's "id_excedente" value
 * @method CA_EXCEDENTES setIdCredito()           Sets the current record's "id_credito" value
 * @method CA_EXCEDENTES setValor()               Sets the current record's "valor" value
 * @method CA_EXCEDENTES setEnUso()               Sets the current record's "en_uso" value
 * @method CA_EXCEDENTES setIdCreditoAplicado()   Sets the current record's "id_credito_aplicado" value
 * @method CA_EXCEDENTES setIdMaeTer()            Sets the current record's "id_mae_ter" value
 * @method CA_EXCEDENTES setCACREDITO()           Sets the current record's "CA_CREDITO" value
 * @method CA_EXCEDENTES setCACREDITO2()          Sets the current record's "CA_CREDITO_2" value
 * @method CA_EXCEDENTES setINTERCEROS()          Sets the current record's "INTERCEROS" value
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_EXCEDENTES extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_EXCEDENTES');
        $this->hasColumn('id_excedente', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_credito', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor', 'decimal', 38, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 38,
             ));
        $this->hasColumn('en_uso', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_credito_aplicado', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('CA_CREDITO as CA_CREDITO_2', array(
             'local' => 'id_credito_aplicado',
             'foreign' => 'id_credito'));

        $this->hasOne('INTERCEROS', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));
    }
}