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

/**
 * BaseCN_CONTROL_PERIODO_LOG
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $usuario
 * @property timestamp $fecha
 * @property string $accion
 * @property integer $id_control_periodo
 * @property integer $id_vigencia
 * @property integer $id_periodo_contable
 * @property integer $id_cen_op
 * @property integer $id_cia
 * @property integer $activo
 * @property CN_VIGENCIA $CN_VIGENCIA
 * @property CN_PERIODO_CONTABLE $CN_PERIODO_CONTABLE
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION_4
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION_5
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION_6
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION_2
 * @property CN_CENTRO_OPERACION $CN_CENTRO_OPERACION_3
 * 
 * @method integer                getId()                    Returns the current record's "id" value
 * @method string                 getUsuario()               Returns the current record's "usuario" value
 * @method timestamp              getFecha()                 Returns the current record's "fecha" value
 * @method string                 getAccion()                Returns the current record's "accion" value
 * @method integer                getIdControlPeriodo()      Returns the current record's "id_control_periodo" value
 * @method integer                getIdVigencia()            Returns the current record's "id_vigencia" value
 * @method integer                getIdPeriodoContable()     Returns the current record's "id_periodo_contable" value
 * @method integer                getIdCenOp()               Returns the current record's "id_cen_op" value
 * @method integer                getIdCia()                 Returns the current record's "id_cia" value
 * @method integer                getActivo()                Returns the current record's "activo" value
 * @method CN_VIGENCIA            getCNVIGENCIA()            Returns the current record's "CN_VIGENCIA" value
 * @method CN_PERIODO_CONTABLE    getCNPERIODOCONTABLE()     Returns the current record's "CN_PERIODO_CONTABLE" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION()     Returns the current record's "CN_CENTRO_OPERACION" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION4()    Returns the current record's "CN_CENTRO_OPERACION_4" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION5()    Returns the current record's "CN_CENTRO_OPERACION_5" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION6()    Returns the current record's "CN_CENTRO_OPERACION_6" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION2()    Returns the current record's "CN_CENTRO_OPERACION_2" value
 * @method CN_CENTRO_OPERACION    getCNCENTROOPERACION3()    Returns the current record's "CN_CENTRO_OPERACION_3" value
 * @method CN_CONTROL_PERIODO_LOG setId()                    Sets the current record's "id" value
 * @method CN_CONTROL_PERIODO_LOG setUsuario()               Sets the current record's "usuario" value
 * @method CN_CONTROL_PERIODO_LOG setFecha()                 Sets the current record's "fecha" value
 * @method CN_CONTROL_PERIODO_LOG setAccion()                Sets the current record's "accion" value
 * @method CN_CONTROL_PERIODO_LOG setIdControlPeriodo()      Sets the current record's "id_control_periodo" value
 * @method CN_CONTROL_PERIODO_LOG setIdVigencia()            Sets the current record's "id_vigencia" value
 * @method CN_CONTROL_PERIODO_LOG setIdPeriodoContable()     Sets the current record's "id_periodo_contable" value
 * @method CN_CONTROL_PERIODO_LOG setIdCenOp()               Sets the current record's "id_cen_op" value
 * @method CN_CONTROL_PERIODO_LOG setIdCia()                 Sets the current record's "id_cia" value
 * @method CN_CONTROL_PERIODO_LOG setActivo()                Sets the current record's "activo" value
 * @method CN_CONTROL_PERIODO_LOG setCNVIGENCIA()            Sets the current record's "CN_VIGENCIA" value
 * @method CN_CONTROL_PERIODO_LOG setCNPERIODOCONTABLE()     Sets the current record's "CN_PERIODO_CONTABLE" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION()     Sets the current record's "CN_CENTRO_OPERACION" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION4()    Sets the current record's "CN_CENTRO_OPERACION_4" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION5()    Sets the current record's "CN_CENTRO_OPERACION_5" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION6()    Sets the current record's "CN_CENTRO_OPERACION_6" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION2()    Sets the current record's "CN_CENTRO_OPERACION_2" value
 * @method CN_CONTROL_PERIODO_LOG setCNCENTROOPERACION3()    Sets the current record's "CN_CENTRO_OPERACION_3" value
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_CONTROL_PERIODO_LOG extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_CONTROL_PERIODO_LOG');
        $this->hasColumn('id', 'integer', 8, array(
             'type' => 'integer',
             'autoincrement' => true,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('usuario', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('accion', 'string', 256, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('id_control_periodo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_vigencia', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_periodo_contable', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cen_op', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cia', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('activo', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('CN_PERIODO_CONTABLE', array(
             'local' => 'id_periodo_contable',
             'foreign' => 'id_periodo_contable'));

        $this->hasOne('CN_CENTRO_OPERACION', array(
             'local' => 'id_cen_op',
             'foreign' => 'id_cen_op'));

        $this->hasOne('CN_CENTRO_OPERACION as CN_CENTRO_OPERACION_4', array(
             'local' => 'id_cia',
             'foreign' => 'id_cen_op'));

        $this->hasOne('CN_CENTRO_OPERACION as CN_CENTRO_OPERACION_5', array(
             'local' => 'id_cen_op',
             'foreign' => 'id_cia'));

        $this->hasOne('CN_CENTRO_OPERACION as CN_CENTRO_OPERACION_6', array(
             'local' => 'id_cia',
             'foreign' => 'id_cia'));

        $this->hasOne('CN_CENTRO_OPERACION as CN_CENTRO_OPERACION_2', array(
             'local' => 'id_cen_op',
             'foreign' => 'id_cia'));

        $this->hasOne('CN_CENTRO_OPERACION as CN_CENTRO_OPERACION_3', array(
             'local' => 'id_cia',
             'foreign' => 'id_cen_op'));
    }
}