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

/**
 * BaseTS_AE_CIIU
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $codigo_ciiu
 * @property string $descripcion
 * @property integer $id_agrup_ciiu
 * @property integer $id_ae_ciiu
 * @property TS_AGRUP_CIIU $TS_AGRUP_CIIU
 * @property Doctrine_Collection $INTERCER_DT
 * @property Doctrine_Collection $INTERCER_DT_3
 * @property Doctrine_Collection $INTERCER_DT_4
 * @property Doctrine_Collection $INTERCER_DT_5
 * @property Doctrine_Collection $INTERCER_DT_2
 * 
 * @method integer             getCodigoCiiu()    Returns the current record's "codigo_ciiu" value
 * @method string              getDescripcion()   Returns the current record's "descripcion" value
 * @method integer             getIdAgrupCiiu()   Returns the current record's "id_agrup_ciiu" value
 * @method integer             getIdAeCiiu()      Returns the current record's "id_ae_ciiu" value
 * @method TS_AGRUP_CIIU       getTSAGRUPCIIU()   Returns the current record's "TS_AGRUP_CIIU" value
 * @method Doctrine_Collection getINTERCERDT()    Returns the current record's "INTERCER_DT" collection
 * @method Doctrine_Collection getINTERCERDT3()   Returns the current record's "INTERCER_DT_3" collection
 * @method Doctrine_Collection getINTERCERDT4()   Returns the current record's "INTERCER_DT_4" collection
 * @method Doctrine_Collection getINTERCERDT5()   Returns the current record's "INTERCER_DT_5" collection
 * @method Doctrine_Collection getINTERCERDT2()   Returns the current record's "INTERCER_DT_2" collection
 * @method TS_AE_CIIU          setCodigoCiiu()    Sets the current record's "codigo_ciiu" value
 * @method TS_AE_CIIU          setDescripcion()   Sets the current record's "descripcion" value
 * @method TS_AE_CIIU          setIdAgrupCiiu()   Sets the current record's "id_agrup_ciiu" value
 * @method TS_AE_CIIU          setIdAeCiiu()      Sets the current record's "id_ae_ciiu" value
 * @method TS_AE_CIIU          setTSAGRUPCIIU()   Sets the current record's "TS_AGRUP_CIIU" value
 * @method TS_AE_CIIU          setINTERCERDT()    Sets the current record's "INTERCER_DT" collection
 * @method TS_AE_CIIU          setINTERCERDT3()   Sets the current record's "INTERCER_DT_3" collection
 * @method TS_AE_CIIU          setINTERCERDT4()   Sets the current record's "INTERCER_DT_4" collection
 * @method TS_AE_CIIU          setINTERCERDT5()   Sets the current record's "INTERCER_DT_5" collection
 * @method TS_AE_CIIU          setINTERCERDT2()   Sets the current record's "INTERCER_DT_2" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_AE_CIIU extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_AE_CIIU');
        $this->hasColumn('codigo_ciiu', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('id_agrup_ciiu', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ae_ciiu', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
    }

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

        $this->hasMany('INTERCER_DT', array(
             'local' => 'id_ae_ciiu',
             'foreign' => 'ciiu_cua'));

        $this->hasMany('INTERCER_DT as INTERCER_DT_3', array(
             'local' => 'id_ae_ciiu',
             'foreign' => 'ciiu_sec'));

        $this->hasMany('INTERCER_DT as INTERCER_DT_4', array(
             'local' => 'id_ae_ciiu',
             'foreign' => 'ciiu_prin'));

        $this->hasMany('INTERCER_DT as INTERCER_DT_5', array(
             'local' => 'id_ae_ciiu',
             'foreign' => 'ciiu_cua'));

        $this->hasMany('INTERCER_DT as INTERCER_DT_2', array(
             'local' => 'id_ae_ciiu',
             'foreign' => 'ciiu_ter'));
    }
}