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

/**
 * BaseCN_PERIODO_CONTABLE
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_periodo_contable
 * @property string $nom_periodo
 * @property Doctrine_Collection $CN_TIPO_COMP_PERIODO_VALIDO
 * @property Doctrine_Collection $CN_CONTROL_PERIODO_LOG
 * @property Doctrine_Collection $CN_CONTROL_PERIODO
 * @property Doctrine_Collection $CN_CONTROL_CAD
 * 
 * @method integer             getIdPeriodoContable()           Returns the current record's "id_periodo_contable" value
 * @method string              getNomPeriodo()                  Returns the current record's "nom_periodo" value
 * @method Doctrine_Collection getCNTIPOCOMPPERIODOVALIDO()     Returns the current record's "CN_TIPO_COMP_PERIODO_VALIDO" collection
 * @method Doctrine_Collection getCNCONTROLPERIODOLOG()         Returns the current record's "CN_CONTROL_PERIODO_LOG" collection
 * @method Doctrine_Collection getCNCONTROLPERIODO()            Returns the current record's "CN_CONTROL_PERIODO" collection
 * @method Doctrine_Collection getCNCONTROLCAD()                Returns the current record's "CN_CONTROL_CAD" collection
 * @method CN_PERIODO_CONTABLE setIdPeriodoContable()           Sets the current record's "id_periodo_contable" value
 * @method CN_PERIODO_CONTABLE setNomPeriodo()                  Sets the current record's "nom_periodo" value
 * @method CN_PERIODO_CONTABLE setCNTIPOCOMPPERIODOVALIDO()     Sets the current record's "CN_TIPO_COMP_PERIODO_VALIDO" collection
 * @method CN_PERIODO_CONTABLE setCNCONTROLPERIODOLOG()         Sets the current record's "CN_CONTROL_PERIODO_LOG" collection
 * @method CN_PERIODO_CONTABLE setCNCONTROLPERIODO()            Sets the current record's "CN_CONTROL_PERIODO" collection
 * @method CN_PERIODO_CONTABLE setCNCONTROLCAD()                Sets the current record's "CN_CONTROL_CAD" collection
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_PERIODO_CONTABLE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_PERIODO_CONTABLE');
        $this->hasColumn('id_periodo_contable', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('nom_periodo', 'string', 16, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 16,
             ));
    }

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

        $this->hasMany('CN_CONTROL_PERIODO_LOG', array(
             'local' => 'id_periodo_contable',
             'foreign' => 'id_periodo_contable'));

        $this->hasMany('CN_CONTROL_PERIODO', array(
             'local' => 'id_periodo_contable',
             'foreign' => 'id_periodo_contable'));

        $this->hasMany('CN_CONTROL_CAD', array(
             'local' => 'id_periodo_contable',
             'foreign' => 'id_periodo_contable'));
    }
}