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

/**
 * BasePR_PAGOS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_rp
 * @property decimal $valor_total
 * @property integer $num_pagos
 * @property timestamp $fecha
 * @property integer $id_periodo
 * @property integer $estado
 * @property integer $id_vigencia
 * @property string $vigencia
 * @property PERIODO $PERIODO
 * @property VIGENCIA $VIGENCIA
 * @property Doctrine_Collection $PR_PAGOS_DISTRI
 * 
 * @method integer             getId()              Returns the current record's "id" value
 * @method integer             getIdRp()            Returns the current record's "id_rp" value
 * @method decimal             getValorTotal()      Returns the current record's "valor_total" value
 * @method integer             getNumPagos()        Returns the current record's "num_pagos" value
 * @method timestamp           getFecha()           Returns the current record's "fecha" value
 * @method integer             getIdPeriodo()       Returns the current record's "id_periodo" value
 * @method integer             getEstado()          Returns the current record's "estado" value
 * @method integer             getIdVigencia()      Returns the current record's "id_vigencia" value
 * @method string              getVigencia()        Returns the current record's "vigencia" value
 * @method PERIODO             getPERIODO()         Returns the current record's "PERIODO" value
 * @method VIGENCIA            getVIGENCIA()        Returns the current record's "VIGENCIA" value
 * @method Doctrine_Collection getPRPAGOSDISTRI()   Returns the current record's "PR_PAGOS_DISTRI" collection
 * @method PR_PAGOS            setId()              Sets the current record's "id" value
 * @method PR_PAGOS            setIdRp()            Sets the current record's "id_rp" value
 * @method PR_PAGOS            setValorTotal()      Sets the current record's "valor_total" value
 * @method PR_PAGOS            setNumPagos()        Sets the current record's "num_pagos" value
 * @method PR_PAGOS            setFecha()           Sets the current record's "fecha" value
 * @method PR_PAGOS            setIdPeriodo()       Sets the current record's "id_periodo" value
 * @method PR_PAGOS            setEstado()          Sets the current record's "estado" value
 * @method PR_PAGOS            setIdVigencia()      Sets the current record's "id_vigencia" value
 * @method PR_PAGOS            setVigencia()        Sets the current record's "vigencia" value
 * @method PR_PAGOS            setPERIODO()         Sets the current record's "PERIODO" value
 * @method PR_PAGOS            setVIGENCIA()        Sets the current record's "VIGENCIA" value
 * @method PR_PAGOS            setPRPAGOSDISTRI()   Sets the current record's "PR_PAGOS_DISTRI" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_PAGOS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_PAGOS');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_rp', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_total', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_pagos', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_periodo', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_vigencia', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('vigencia', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('VIGENCIA', array(
             'local' => 'id_vigencia',
             'foreign' => 'id_vigencia'));

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