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

/**
 * BaseRE_PERIODO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_periodo
 * @property string $cod_periodo
 * @property string $descripcion
 * @property integer $estado
 * @property Doctrine_Collection $TS_DIS_REG
 * @property Doctrine_Collection $RE_DISTRIBUCION
 * 
 * @method integer             getIdPeriodo()       Returns the current record's "id_periodo" value
 * @method string              getCodPeriodo()      Returns the current record's "cod_periodo" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method integer             getEstado()          Returns the current record's "estado" value
 * @method Doctrine_Collection getTSDISREG()        Returns the current record's "TS_DIS_REG" collection
 * @method Doctrine_Collection getREDISTRIBUCION()  Returns the current record's "RE_DISTRIBUCION" collection
 * @method RE_PERIODO          setIdPeriodo()       Sets the current record's "id_periodo" value
 * @method RE_PERIODO          setCodPeriodo()      Sets the current record's "cod_periodo" value
 * @method RE_PERIODO          setDescripcion()     Sets the current record's "descripcion" value
 * @method RE_PERIODO          setEstado()          Sets the current record's "estado" value
 * @method RE_PERIODO          setTSDISREG()        Sets the current record's "TS_DIS_REG" collection
 * @method RE_PERIODO          setREDISTRIBUCION()  Sets the current record's "RE_DISTRIBUCION" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_PERIODO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_PERIODO');
        $this->hasColumn('id_periodo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('cod_periodo', 'string', 4, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('descripcion', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasMany('RE_DISTRIBUCION', array(
             'local' => 'id_periodo',
             'foreign' => 'id_periodo'));
    }
}