<?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 integer $aplica_bn
 * @property integer $aplica_ingresos
 * @property Doctrine_Collection $TS_RC
 * @property Doctrine_Collection $TS_FORMA_PAGO_DISTRI
 * @property Doctrine_Collection $CA_FACTURA_PAGO
 * 
 * @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 integer             getAplicaBn()             Returns the current record's "aplica_bn" value
 * @method integer             getAplicaIngresos()       Returns the current record's "aplica_ingresos" value
 * @method Doctrine_Collection getTSRC()                 Returns the current record's "TS_RC" collection
 * @method Doctrine_Collection getTSFORMAPAGODISTRI()    Returns the current record's "TS_FORMA_PAGO_DISTRI" collection
 * @method Doctrine_Collection getCAFACTURAPAGO()        Returns the current record's "CA_FACTURA_PAGO" 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            setAplicaBn()             Sets the current record's "aplica_bn" value
 * @method TS_PC_FP            setAplicaIngresos()       Sets the current record's "aplica_ingresos" value
 * @method TS_PC_FP            setTSRC()                 Sets the current record's "TS_RC" collection
 * @method TS_PC_FP            setTSFORMAPAGODISTRI()    Sets the current record's "TS_FORMA_PAGO_DISTRI" collection
 * @method TS_PC_FP            setCAFACTURAPAGO()        Sets the current record's "CA_FACTURA_PAGO" collection
 * 
 * @package    controlComisiones
 * @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(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('estado', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('usar_caja', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('usar_pos', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('aplica_bn', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $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('TS_RC', array(
             'local' => 'id',
             'foreign' => 'id_ts_fp'));

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

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