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

/**
 * BaseTS_AGRUP_CIIU
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_ae
 * @property string $agrupacion
 * @property string $descripcion
 * @property string $abreviatura
 * @property decimal $tarifa_por_mil
 * @property integer $id_im
 * @property Doctrine_Collection $TS_IM
 * @property Doctrine_Collection $TS_AE_CIIU
 * 
 * @method integer             getIdAe()           Returns the current record's "id_ae" value
 * @method string              getAgrupacion()     Returns the current record's "agrupacion" value
 * @method string              getDescripcion()    Returns the current record's "descripcion" value
 * @method string              getAbreviatura()    Returns the current record's "abreviatura" value
 * @method decimal             getTarifaPorMil()   Returns the current record's "tarifa_por_mil" value
 * @method integer             getIdIm()           Returns the current record's "id_im" value
 * @method Doctrine_Collection getTSIM()           Returns the current record's "TS_IM" collection
 * @method Doctrine_Collection getTSAECIIU()       Returns the current record's "TS_AE_CIIU" collection
 * @method TS_AGRUP_CIIU       setIdAe()           Sets the current record's "id_ae" value
 * @method TS_AGRUP_CIIU       setAgrupacion()     Sets the current record's "agrupacion" value
 * @method TS_AGRUP_CIIU       setDescripcion()    Sets the current record's "descripcion" value
 * @method TS_AGRUP_CIIU       setAbreviatura()    Sets the current record's "abreviatura" value
 * @method TS_AGRUP_CIIU       setTarifaPorMil()   Sets the current record's "tarifa_por_mil" value
 * @method TS_AGRUP_CIIU       setIdIm()           Sets the current record's "id_im" value
 * @method TS_AGRUP_CIIU       setTSIM()           Sets the current record's "TS_IM" collection
 * @method TS_AGRUP_CIIU       setTSAECIIU()       Sets the current record's "TS_AE_CIIU" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_AGRUP_CIIU extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_AGRUP_CIIU');
        $this->hasColumn('id_ae', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('agrupacion', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             '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('abreviatura', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('tarifa_por_mil', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_im', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasMany('TS_AE_CIIU', array(
             'local' => 'id_ae',
             'foreign' => 'id_agrup_ciiu'));
    }
}