<?php

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('TS_PC_FP', 'doctrine');

/**
 * BaseTS_PC_FP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property string $estado
 * @property integer $usar_caja
 * @property integer $usar_pos
 * @property Doctrine_Collection $CA_FACTURA_PAGO
 * @property Doctrine_Collection $TS_FORMA_PAGO_DISTRI
 * @property Doctrine_Collection $TS_RC
 * @property Doctrine_Collection $CA_FACTURA_PAGO_TEMP
 * @property Doctrine_Collection $CA_DEBITO
 * 
 * @method integer             getId()                   Returns the current record's "id" value
 * @method string              getCodigo()               Returns the current record's "codigo" value
 * @method string              getDescripcion()          Returns the current record's "descripcion" value
 * @method string              getEstado()               Returns the current record's "estado" value
 * @method integer             getUsarCaja()             Returns the current record's "usar_caja" value
 * @method integer             getUsarPos()              Returns the current record's "usar_pos" value
 * @method Doctrine_Collection getCAFACTURAPAGO()        Returns the current record's "CA_FACTURA_PAGO" collection
 * @method Doctrine_Collection getTSFORMAPAGODISTRI()    Returns the current record's "TS_FORMA_PAGO_DISTRI" collection
 * @method Doctrine_Collection getTSRC()                 Returns the current record's "TS_RC" collection
 * @method Doctrine_Collection getCAFACTURAPAGOTEMP()    Returns the current record's "CA_FACTURA_PAGO_TEMP" collection
 * @method Doctrine_Collection getCADEBITO()             Returns the current record's "CA_DEBITO" collection
 * @method TS_PC_FP            setId()                   Sets the current record's "id" value
 * @method TS_PC_FP            setCodigo()               Sets the current record's "codigo" value
 * @method TS_PC_FP            setDescripcion()          Sets the current record's "descripcion" value
 * @method TS_PC_FP            setEstado()               Sets the current record's "estado" value
 * @method TS_PC_FP            setUsarCaja()             Sets the current record's "usar_caja" value
 * @method TS_PC_FP            setUsarPos()              Sets the current record's "usar_pos" value
 * @method TS_PC_FP            setCAFACTURAPAGO()        Sets the current record's "CA_FACTURA_PAGO" collection
 * @method TS_PC_FP            setTSFORMAPAGODISTRI()    Sets the current record's "TS_FORMA_PAGO_DISTRI" collection
 * @method TS_PC_FP            setTSRC()                 Sets the current record's "TS_RC" collection
 * @method TS_PC_FP            setCAFACTURAPAGOTEMP()    Sets the current record's "CA_FACTURA_PAGO_TEMP" collection
 * @method TS_PC_FP            setCADEBITO()             Sets the current record's "CA_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 BaseTS_PC_FP extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('TS_PC_FP');
        $this->hasColumn('id', 'integer', 20, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));
        $this->hasColumn('codigo', 'string', 20, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('descripcion', 'string', 1000, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 1000,
        ));
        $this->hasColumn('estado', 'string', 1, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0 ',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('usar_caja', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('usar_pos', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('aplica_bn', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('aplica_ingresos', 'integer', 1, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '1',
            'primary' => false,
            'length' => 1,
        ));
    }

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

        $this->hasMany('TS_FORMA_PAGO_DISTRI', array(
            'local' => 'id',
            'foreign' => 'id_pc_fp'));

        $this->hasMany('TS_RC', array(
            'local' => 'id',
            'foreign' => 'id_ts_fp'));

        $this->hasMany('CA_FACTURA_PAGO_TEMP', array(
            'local' => 'id',
            'foreign' => 'id_ts_pc_fp'));

        $this->hasMany('CA_DEBITO', array(
            'local' => 'id',
            'foreign' => 'id_pc_fp'));
    }

}
