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

/**
 * BaseCN_SUB_AUX
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_sub_aux
 * @property integer $id_cia
 * @property integer $id_tipo_sub_aux
 * @property string $cod_sub_aux
 * @property string $nombre
 * @property string $nom_corto
 * @property integer $activo
 * @property CN_TIPO_SUB_AUX $CN_TIPO_SUB_AUX
 * @property CN_TIPO_SUB_AUX $CN_TIPO_SUB_AUX_2
 * @property CN_TIPO_SUB_AUX $CN_TIPO_SUB_AUX_3
 * @property CN_TIPO_SUB_AUX $CN_TIPO_SUB_AUX_4
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_2
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_3
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_4
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_43
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_44
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_45
 * 
 * @method integer             getIdSubAux()                  Returns the current record's "id_sub_aux" value
 * @method integer             getIdCia()                     Returns the current record's "id_cia" value
 * @method integer             getIdTipoSubAux()              Returns the current record's "id_tipo_sub_aux" value
 * @method string              getCodSubAux()                 Returns the current record's "cod_sub_aux" value
 * @method string              getNombre()                    Returns the current record's "nombre" value
 * @method string              getNomCorto()                  Returns the current record's "nom_corto" value
 * @method integer             getActivo()                    Returns the current record's "activo" value
 * @method CN_TIPO_SUB_AUX     getCNTIPOSUBAUX()              Returns the current record's "CN_TIPO_SUB_AUX" value
 * @method CN_TIPO_SUB_AUX     getCNTIPOSUBAUX2()             Returns the current record's "CN_TIPO_SUB_AUX_2" value
 * @method CN_TIPO_SUB_AUX     getCNTIPOSUBAUX3()             Returns the current record's "CN_TIPO_SUB_AUX_3" value
 * @method CN_TIPO_SUB_AUX     getCNTIPOSUBAUX4()             Returns the current record's "CN_TIPO_SUB_AUX_4" value
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE()      Returns the current record's "CN_MOVIMIENTO_CONTABLE" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE2()     Returns the current record's "CN_MOVIMIENTO_CONTABLE_2" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE3()     Returns the current record's "CN_MOVIMIENTO_CONTABLE_3" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE4()     Returns the current record's "CN_MOVIMIENTO_CONTABLE_4" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE43()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_43" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE44()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_44" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE45()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_45" collection
 * @method CN_SUB_AUX          setIdSubAux()                  Sets the current record's "id_sub_aux" value
 * @method CN_SUB_AUX          setIdCia()                     Sets the current record's "id_cia" value
 * @method CN_SUB_AUX          setIdTipoSubAux()              Sets the current record's "id_tipo_sub_aux" value
 * @method CN_SUB_AUX          setCodSubAux()                 Sets the current record's "cod_sub_aux" value
 * @method CN_SUB_AUX          setNombre()                    Sets the current record's "nombre" value
 * @method CN_SUB_AUX          setNomCorto()                  Sets the current record's "nom_corto" value
 * @method CN_SUB_AUX          setActivo()                    Sets the current record's "activo" value
 * @method CN_SUB_AUX          setCNTIPOSUBAUX()              Sets the current record's "CN_TIPO_SUB_AUX" value
 * @method CN_SUB_AUX          setCNTIPOSUBAUX2()             Sets the current record's "CN_TIPO_SUB_AUX_2" value
 * @method CN_SUB_AUX          setCNTIPOSUBAUX3()             Sets the current record's "CN_TIPO_SUB_AUX_3" value
 * @method CN_SUB_AUX          setCNTIPOSUBAUX4()             Sets the current record's "CN_TIPO_SUB_AUX_4" value
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE()      Sets the current record's "CN_MOVIMIENTO_CONTABLE" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE2()     Sets the current record's "CN_MOVIMIENTO_CONTABLE_2" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE3()     Sets the current record's "CN_MOVIMIENTO_CONTABLE_3" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE4()     Sets the current record's "CN_MOVIMIENTO_CONTABLE_4" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE43()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_43" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE44()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_44" collection
 * @method CN_SUB_AUX          setCNMOVIMIENTOCONTABLE45()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_45" collection
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_SUB_AUX extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_SUB_AUX');
        $this->hasColumn('id_sub_aux', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_cia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_sub_aux', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('cod_sub_aux', 'string', 3, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 3,
             ));
        $this->hasColumn('nombre', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('nom_corto', 'string', 32, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 32,
             ));
        $this->hasColumn('activo', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('CN_TIPO_SUB_AUX as CN_TIPO_SUB_AUX_2', array(
             'local' => 'id_tipo_sub_aux',
             'foreign' => 'id_tipo_sub_aux'));

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

        $this->hasOne('CN_TIPO_SUB_AUX as CN_TIPO_SUB_AUX_4', array(
             'local' => 'id_tipo_sub_aux',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE', array(
             'local' => 'id_sub_aux',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_2', array(
             'local' => 'id_sub_aux',
             'foreign' => 'id_sub_aux'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_3', array(
             'local' => 'id_cia',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_4', array(
             'local' => 'id_cia',
             'foreign' => 'id_sub_aux'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_43', array(
             'local' => 'id_cia',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_44', array(
             'local' => 'id_sub_aux',
             'foreign' => 'id_sub_aux'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_45', array(
             'local' => 'id_cia',
             'foreign' => 'id_sub_aux'));
    }
}