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

/**
 * BaseCA_GRUPO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_grupo
 * @property string $descripcion
 * @property integer $estado
 * @property integer $id_rubro_ingresos
 * @property Doctrine_Collection $CA_PRODUCTO
 * @property Doctrine_Collection $CA_NOTA_DEBITO
 * 
 * @method integer             getIdGrupo()           Returns the current record's "id_grupo" value
 * @method string              getDescripcion()       Returns the current record's "descripcion" value
 * @method integer             getEstado()            Returns the current record's "estado" value
 * @method integer             getIdRubroIngresos()   Returns the current record's "id_rubro_ingresos" value
 * @method Doctrine_Collection getCAPRODUCTO()        Returns the current record's "CA_PRODUCTO" collection
 * @method Doctrine_Collection getCANOTADEBITO()      Returns the current record's "CA_NOTA_DEBITO" collection
 * @method CA_GRUPO            setIdGrupo()           Sets the current record's "id_grupo" value
 * @method CA_GRUPO            setDescripcion()       Sets the current record's "descripcion" value
 * @method CA_GRUPO            setEstado()            Sets the current record's "estado" value
 * @method CA_GRUPO            setIdRubroIngresos()   Sets the current record's "id_rubro_ingresos" value
 * @method CA_GRUPO            setCAPRODUCTO()        Sets the current record's "CA_PRODUCTO" collection
 * @method CA_GRUPO            setCANOTADEBITO()      Sets the current record's "CA_NOTA_DEBITO" 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_GRUPO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_GRUPO');
        $this->hasColumn('id_grupo', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('descripcion', 'string', 256, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             'default' => '0',
             ));
        $this->hasColumn('id_rubro_ingresos', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasMany('CA_NOTA_DEBITO', array(
             'local' => 'id_grupo',
             'foreign' => 'id_grupo'));
    }
}