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

/**
 * BasePR_APO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_apo
 * @property integer $id_cpo
 * @property string $ano_fiscal
 * @property decimal $valor_apo
 * @property integer $id_tipo_novedad
 * @property string $mes_fiscal
 * @property integer $id_vigencia
 * @property timestamp $fecha_proceso
 * @property timestamp $fechalog
 * @property string $usuariolog
 * @property VIGENCIA $VIGENCIA
 * @property PROYECTOS $PROYECTOS
 * @property Doctrine_Collection $PR_APO_NPO
 * 
 * @method integer             getIdApo()           Returns the current record's "id_apo" value
 * @method integer             getIdCpo()           Returns the current record's "id_cpo" value
 * @method string              getAnoFiscal()       Returns the current record's "ano_fiscal" value
 * @method decimal             getValorApo()        Returns the current record's "valor_apo" value
 * @method integer             getIdTipoNovedad()   Returns the current record's "id_tipo_novedad" value
 * @method string              getMesFiscal()       Returns the current record's "mes_fiscal" value
 * @method integer             getIdVigencia()      Returns the current record's "id_vigencia" value
 * @method timestamp           getFechaProceso()    Returns the current record's "fecha_proceso" value
 * @method timestamp           getFechalog()        Returns the current record's "fechalog" value
 * @method string              getUsuariolog()      Returns the current record's "usuariolog" value
 * @method VIGENCIA            getVIGENCIA()        Returns the current record's "VIGENCIA" value
 * @method PROYECTOS           getPROYECTOS()       Returns the current record's "PROYECTOS" value
 * @method Doctrine_Collection getPRAPONPO()        Returns the current record's "PR_APO_NPO" collection
 * @method PR_APO              setIdApo()           Sets the current record's "id_apo" value
 * @method PR_APO              setIdCpo()           Sets the current record's "id_cpo" value
 * @method PR_APO              setAnoFiscal()       Sets the current record's "ano_fiscal" value
 * @method PR_APO              setValorApo()        Sets the current record's "valor_apo" value
 * @method PR_APO              setIdTipoNovedad()   Sets the current record's "id_tipo_novedad" value
 * @method PR_APO              setMesFiscal()       Sets the current record's "mes_fiscal" value
 * @method PR_APO              setIdVigencia()      Sets the current record's "id_vigencia" value
 * @method PR_APO              setFechaProceso()    Sets the current record's "fecha_proceso" value
 * @method PR_APO              setFechalog()        Sets the current record's "fechalog" value
 * @method PR_APO              setUsuariolog()      Sets the current record's "usuariolog" value
 * @method PR_APO              setVIGENCIA()        Sets the current record's "VIGENCIA" value
 * @method PR_APO              setPROYECTOS()       Sets the current record's "PROYECTOS" value
 * @method PR_APO              setPRAPONPO()        Sets the current record's "PR_APO_NPO" 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_APO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_APO');
        $this->hasColumn('id_apo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_cpo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('ano_fiscal', 'string', 4, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('valor_apo', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_novedad', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('mes_fiscal', 'string', 2, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2,
             ));
        $this->hasColumn('id_vigencia', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_proceso', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fechalog', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('usuariolog', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('PROYECTOS', array(
             'local' => 'id_cpo',
             'foreign' => 'id'));

        $this->hasMany('PR_APO_NPO', array(
             'local' => 'id_apo',
             'foreign' => 'id_apo'));
    }
}