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

/**
 * BaseCA_LIQ_CANON
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_liq_canon
 * @property integer $vigencia
 * @property timestamp $fecha
 * @property integer $estado
 * @property string $motivo_anu
 * @property timestamp $fecha_anula
 * @property integer $id_usuario_anula
 * @property integer $automatico
 * @property integer $anulado
 * @property string $motivo_cierre
 * @property timestamp $fecha_cierre
 * @property integer $id_usuario_cierre
 * @property integer $id_competencia
 * @property integer $auto
 * @property CA_USUARIO $CA_USUARIO
 * @property RMN_COMPETENCIA $RMN_COMPETENCIA
 * @property CA_USUARIO $CA_USUARIO_3
 * @property Doctrine_Collection $CA_DET_LIQ_MIGRA
 * @property Doctrine_Collection $CA_DET_LIQ_MIGRA_4
 * @property Doctrine_Collection $CA_DET_LIQ_MIGRA_5
 * @property Doctrine_Collection $CA_DET_LIQ_MIGRA_6
 * @property Doctrine_Collection $CA_DET_LIQ_CANON
 * @property Doctrine_Collection $CA_DET_LIQ_CANON_2
 * @property Doctrine_Collection $CA_DET_LIQ_CANON_3
 * @property Doctrine_Collection $CA_DET_LIQ_CANON_4
 * @property Doctrine_Collection $CA_DET_LIQ_CANON_5
 * @property Doctrine_Collection $CA_DET_LIQ_CANON_6
 * 
 * @method integer             getIdLiqCanon()         Returns the current record's "id_liq_canon" value
 * @method integer             getVigencia()           Returns the current record's "vigencia" value
 * @method timestamp           getFecha()              Returns the current record's "fecha" value
 * @method integer             getEstado()             Returns the current record's "estado" value
 * @method string              getMotivoAnu()          Returns the current record's "motivo_anu" value
 * @method timestamp           getFechaAnula()         Returns the current record's "fecha_anula" value
 * @method integer             getIdUsuarioAnula()     Returns the current record's "id_usuario_anula" value
 * @method integer             getAutomatico()         Returns the current record's "automatico" value
 * @method integer             getAnulado()            Returns the current record's "anulado" value
 * @method string              getMotivoCierre()       Returns the current record's "motivo_cierre" value
 * @method timestamp           getFechaCierre()        Returns the current record's "fecha_cierre" value
 * @method integer             getIdUsuarioCierre()    Returns the current record's "id_usuario_cierre" value
 * @method integer             getIdCompetencia()      Returns the current record's "id_competencia" value
 * @method integer             getAuto()               Returns the current record's "auto" value
 * @method CA_USUARIO          getCAUSUARIO()          Returns the current record's "CA_USUARIO" value
 * @method RMN_COMPETENCIA     getRMNCOMPETENCIA()     Returns the current record's "RMN_COMPETENCIA" value
 * @method CA_USUARIO          getCAUSUARIO3()         Returns the current record's "CA_USUARIO_3" value
 * @method Doctrine_Collection getCADETLIQMIGRA()      Returns the current record's "CA_DET_LIQ_MIGRA" collection
 * @method Doctrine_Collection getCADETLIQMIGRA4()     Returns the current record's "CA_DET_LIQ_MIGRA_4" collection
 * @method Doctrine_Collection getCADETLIQMIGRA5()     Returns the current record's "CA_DET_LIQ_MIGRA_5" collection
 * @method Doctrine_Collection getCADETLIQMIGRA6()     Returns the current record's "CA_DET_LIQ_MIGRA_6" collection
 * @method Doctrine_Collection getCADETLIQCANON()      Returns the current record's "CA_DET_LIQ_CANON" collection
 * @method Doctrine_Collection getCADETLIQCANON2()     Returns the current record's "CA_DET_LIQ_CANON_2" collection
 * @method Doctrine_Collection getCADETLIQCANON3()     Returns the current record's "CA_DET_LIQ_CANON_3" collection
 * @method Doctrine_Collection getCADETLIQCANON4()     Returns the current record's "CA_DET_LIQ_CANON_4" collection
 * @method Doctrine_Collection getCADETLIQCANON5()     Returns the current record's "CA_DET_LIQ_CANON_5" collection
 * @method Doctrine_Collection getCADETLIQCANON6()     Returns the current record's "CA_DET_LIQ_CANON_6" collection
 * @method CA_LIQ_CANON        setIdLiqCanon()         Sets the current record's "id_liq_canon" value
 * @method CA_LIQ_CANON        setVigencia()           Sets the current record's "vigencia" value
 * @method CA_LIQ_CANON        setFecha()              Sets the current record's "fecha" value
 * @method CA_LIQ_CANON        setEstado()             Sets the current record's "estado" value
 * @method CA_LIQ_CANON        setMotivoAnu()          Sets the current record's "motivo_anu" value
 * @method CA_LIQ_CANON        setFechaAnula()         Sets the current record's "fecha_anula" value
 * @method CA_LIQ_CANON        setIdUsuarioAnula()     Sets the current record's "id_usuario_anula" value
 * @method CA_LIQ_CANON        setAutomatico()         Sets the current record's "automatico" value
 * @method CA_LIQ_CANON        setAnulado()            Sets the current record's "anulado" value
 * @method CA_LIQ_CANON        setMotivoCierre()       Sets the current record's "motivo_cierre" value
 * @method CA_LIQ_CANON        setFechaCierre()        Sets the current record's "fecha_cierre" value
 * @method CA_LIQ_CANON        setIdUsuarioCierre()    Sets the current record's "id_usuario_cierre" value
 * @method CA_LIQ_CANON        setIdCompetencia()      Sets the current record's "id_competencia" value
 * @method CA_LIQ_CANON        setAuto()               Sets the current record's "auto" value
 * @method CA_LIQ_CANON        setCAUSUARIO()          Sets the current record's "CA_USUARIO" value
 * @method CA_LIQ_CANON        setRMNCOMPETENCIA()     Sets the current record's "RMN_COMPETENCIA" value
 * @method CA_LIQ_CANON        setCAUSUARIO3()         Sets the current record's "CA_USUARIO_3" value
 * @method CA_LIQ_CANON        setCADETLIQMIGRA()      Sets the current record's "CA_DET_LIQ_MIGRA" collection
 * @method CA_LIQ_CANON        setCADETLIQMIGRA4()     Sets the current record's "CA_DET_LIQ_MIGRA_4" collection
 * @method CA_LIQ_CANON        setCADETLIQMIGRA5()     Sets the current record's "CA_DET_LIQ_MIGRA_5" collection
 * @method CA_LIQ_CANON        setCADETLIQMIGRA6()     Sets the current record's "CA_DET_LIQ_MIGRA_6" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON()      Sets the current record's "CA_DET_LIQ_CANON" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON2()     Sets the current record's "CA_DET_LIQ_CANON_2" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON3()     Sets the current record's "CA_DET_LIQ_CANON_3" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON4()     Sets the current record's "CA_DET_LIQ_CANON_4" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON5()     Sets the current record's "CA_DET_LIQ_CANON_5" collection
 * @method CA_LIQ_CANON        setCADETLIQCANON6()     Sets the current record's "CA_DET_LIQ_CANON_6" collection
 * 
 * @package    canon
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_LIQ_CANON extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_LIQ_CANON');
        $this->hasColumn('id_liq_canon', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('vigencia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('motivo_anu', 'string', 256, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('fecha_anula', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_usuario_anula', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('automatico', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('anulado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('motivo_cierre', 'string', 256, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('fecha_cierre', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_usuario_cierre', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_competencia', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('afecta_cartera', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1',
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('RMN_COMPETENCIA', array(
             'local' => 'id_competencia',
             'foreign' => 'id_competencia'));

        $this->hasOne('CA_USUARIO as CA_USUARIO_3', array(
             'local' => 'id_usuario_anula',
             'foreign' => 'id_usuario'));

        $this->hasMany('CA_DET_LIQ_MIGRA', array(
             'local' => 'id_liq_canon',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_DET_LIQ_MIGRA as CA_DET_LIQ_MIGRA_4', array(
             'local' => 'id_liq_canon',
             'foreign' => 'id_liq_canon'));

        $this->hasMany('CA_DET_LIQ_MIGRA as CA_DET_LIQ_MIGRA_5', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_DET_LIQ_MIGRA as CA_DET_LIQ_MIGRA_6', array(
             'local' => 'vigencia',
             'foreign' => 'id_liq_canon'));

        $this->hasMany('CA_DET_LIQ_CANON', array(
             'local' => 'id_liq_canon',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_2', array(
             'local' => 'id_liq_canon',
             'foreign' => 'id_liq_canon'));

        $this->hasMany('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_3', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_4', array(
             'local' => 'vigencia',
             'foreign' => 'id_liq_canon'));

        $this->hasMany('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_5', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_6', array(
             'local' => 'vigencia',
             'foreign' => 'id_liq_canon'));
    }
}