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

/**
 * BaseCA_CAJA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_punto_venta
 * @property integer $id_caja
 * @property string $ubicacion
 * @property string $prefijo
 * @property integer $bloqueado
 * @property CA_PUNTO_VENTA $CA_PUNTO_VENTA
 * @property Doctrine_Collection $CA_FACTURA_POS
 * @property Doctrine_Collection $CA_APROB_CAJA
 * @property Doctrine_Collection $CA_ESTADO_CAJA
 * @property Doctrine_Collection $CA_CONSECUTIVO_CAJA
 * @property Doctrine_Collection $CA_FACTURA_POS_TEMP
 * 
 * @method integer             getIdPuntoVenta()        Returns the current record's "id_punto_venta" value
 * @method integer             getIdCaja()              Returns the current record's "id_caja" value
 * @method string              getUbicacion()           Returns the current record's "ubicacion" value
 * @method string              getPrefijo()             Returns the current record's "prefijo" value
 * @method integer             getBloqueado()           Returns the current record's "bloqueado" value
 * @method CA_PUNTO_VENTA      getCAPUNTOVENTA()        Returns the current record's "CA_PUNTO_VENTA" value
 * @method Doctrine_Collection getCAFACTURAPOS()        Returns the current record's "CA_FACTURA_POS" collection
 * @method Doctrine_Collection getCAAPROBCAJA()         Returns the current record's "CA_APROB_CAJA" collection
 * @method Doctrine_Collection getCAESTADOCAJA()        Returns the current record's "CA_ESTADO_CAJA" collection
 * @method Doctrine_Collection getCACONSECUTIVOCAJA()   Returns the current record's "CA_CONSECUTIVO_CAJA" collection
 * @method Doctrine_Collection getCAFACTURAPOSTEMP()    Returns the current record's "CA_FACTURA_POS_TEMP" collection
 * @method CA_CAJA             setIdPuntoVenta()        Sets the current record's "id_punto_venta" value
 * @method CA_CAJA             setIdCaja()              Sets the current record's "id_caja" value
 * @method CA_CAJA             setUbicacion()           Sets the current record's "ubicacion" value
 * @method CA_CAJA             setPrefijo()             Sets the current record's "prefijo" value
 * @method CA_CAJA             setBloqueado()           Sets the current record's "bloqueado" value
 * @method CA_CAJA             setCAPUNTOVENTA()        Sets the current record's "CA_PUNTO_VENTA" value
 * @method CA_CAJA             setCAFACTURAPOS()        Sets the current record's "CA_FACTURA_POS" collection
 * @method CA_CAJA             setCAAPROBCAJA()         Sets the current record's "CA_APROB_CAJA" collection
 * @method CA_CAJA             setCAESTADOCAJA()        Sets the current record's "CA_ESTADO_CAJA" collection
 * @method CA_CAJA             setCACONSECUTIVOCAJA()   Sets the current record's "CA_CONSECUTIVO_CAJA" collection
 * @method CA_CAJA             setCAFACTURAPOSTEMP()    Sets the current record's "CA_FACTURA_POS_TEMP" 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_CAJA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_CAJA');
        $this->hasColumn('id_punto_venta', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_caja', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('ubicacion', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('prefijo', 'string', 5, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 5,
             ));
        $this->hasColumn('bloqueado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('CA_FACTURA_POS', array(
             'local' => 'id_caja',
             'foreign' => 'id_caja'));

        $this->hasMany('CA_APROB_CAJA', array(
             'local' => 'id_caja',
             'foreign' => 'id_caja'));

        $this->hasMany('CA_ESTADO_CAJA', array(
             'local' => 'id_caja',
             'foreign' => 'id_caja'));

        $this->hasMany('CA_CONSECUTIVO_CAJA', array(
             'local' => 'id_caja',
             'foreign' => 'id_caja'));

        $this->hasMany('CA_FACTURA_POS_TEMP', array(
             'local' => 'id_caja',
             'foreign' => 'id_caja'));
    }
}