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

/**
 * BaseCA_TIPO_CREDITO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_tipo_credito
 * @property string $descripcion
 * @property string $desc_corta
 * @property integer $estado
 * @property Doctrine_Collection $CA_CONSECUTIVO_CRE
 * @property Doctrine_Collection $CA_CREDITO
 * 
 * @method integer             getIdTipoCredito()      Returns the current record's "id_tipo_credito" value
 * @method string              getDescripcion()        Returns the current record's "descripcion" value
 * @method string              getDescCorta()          Returns the current record's "desc_corta" value
 * @method integer             getEstado()             Returns the current record's "estado" value
 * @method Doctrine_Collection getCACONSECUTIVOCRE()   Returns the current record's "CA_CONSECUTIVO_CRE" collection
 * @method Doctrine_Collection getCACREDITO()          Returns the current record's "CA_CREDITO" collection
 * @method CA_TIPO_CREDITO     setIdTipoCredito()      Sets the current record's "id_tipo_credito" value
 * @method CA_TIPO_CREDITO     setDescripcion()        Sets the current record's "descripcion" value
 * @method CA_TIPO_CREDITO     setDescCorta()          Sets the current record's "desc_corta" value
 * @method CA_TIPO_CREDITO     setEstado()             Sets the current record's "estado" value
 * @method CA_TIPO_CREDITO     setCACONSECUTIVOCRE()   Sets the current record's "CA_CONSECUTIVO_CRE" collection
 * @method CA_TIPO_CREDITO     setCACREDITO()          Sets the current record's "CA_CREDITO" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_TIPO_CREDITO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_TIPO_CREDITO');
        $this->hasColumn('id_tipo_credito', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 256, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('desc_corta', 'string', 45, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 45,
             ));
        $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('CA_CONSECUTIVO_CRE', array(
             'local' => 'id_tipo_credito',
             'foreign' => 'id_tipo_credito'));

        $this->hasMany('CA_CREDITO', array(
             'local' => 'id_tipo_credito',
             'foreign' => 'id_tipo_credito'));
    }
}