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

/**
 * BasePR_CDP_CPO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_cdp
 * @property decimal $valor_total_cpo
 * @property integer $id_vigencia
 * @property string $ano_fiscal
 * @property VIGENCIA $VIGENCIA
 * @property Doctrine_Collection $PR_CPO_ASIGN
 * 
 * @method integer             getId()              Returns the current record's "id" value
 * @method integer             getIdCdp()           Returns the current record's "id_cdp" value
 * @method decimal             getValorTotalCpo()   Returns the current record's "valor_total_cpo" value
 * @method integer             getIdVigencia()      Returns the current record's "id_vigencia" value
 * @method string              getAnoFiscal()       Returns the current record's "ano_fiscal" value
 * @method VIGENCIA            getVIGENCIA()        Returns the current record's "VIGENCIA" value
 * @method Doctrine_Collection getPRCPOASIGN()      Returns the current record's "PR_CPO_ASIGN" collection
 * @method PR_CDP_CPO          setId()              Sets the current record's "id" value
 * @method PR_CDP_CPO          setIdCdp()           Sets the current record's "id_cdp" value
 * @method PR_CDP_CPO          setValorTotalCpo()   Sets the current record's "valor_total_cpo" value
 * @method PR_CDP_CPO          setIdVigencia()      Sets the current record's "id_vigencia" value
 * @method PR_CDP_CPO          setAnoFiscal()       Sets the current record's "ano_fiscal" value
 * @method PR_CDP_CPO          setVIGENCIA()        Sets the current record's "VIGENCIA" value
 * @method PR_CDP_CPO          setPRCPOASIGN()      Sets the current record's "PR_CPO_ASIGN" 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_CDP_CPO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_CDP_CPO');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_cdp', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_total_cpo', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             '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('ano_fiscal', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
    }

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

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