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

/**
 * BaseCIUDAD
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $nombre
 * @property Doctrine_Collection $PR_PG
 * @property Doctrine_Collection $TS_ACT_BEN_REG
 * @property Doctrine_Collection $TS_CB
 * @property Doctrine_Collection $TS_RC
 * @property Doctrine_Collection $CM_CB
 * @property Doctrine_Collection $DATOS_COMPANIA
 * 
 * @method integer             getId()             Returns the current record's "id" value
 * @method string              getNombre()         Returns the current record's "nombre" value
 * @method Doctrine_Collection getPRPG()           Returns the current record's "PR_PG" collection
 * @method Doctrine_Collection getTSACTBENREG()    Returns the current record's "TS_ACT_BEN_REG" collection
 * @method Doctrine_Collection getTSCB()           Returns the current record's "TS_CB" collection
 * @method Doctrine_Collection getTSRC()           Returns the current record's "TS_RC" collection
 * @method Doctrine_Collection getCMCB()           Returns the current record's "CM_CB" collection
 * @method Doctrine_Collection getDATOSCOMPANIA()  Returns the current record's "DATOS_COMPANIA" collection
 * @method CIUDAD              setId()             Sets the current record's "id" value
 * @method CIUDAD              setNombre()         Sets the current record's "nombre" value
 * @method CIUDAD              setPRPG()           Sets the current record's "PR_PG" collection
 * @method CIUDAD              setTSACTBENREG()    Sets the current record's "TS_ACT_BEN_REG" collection
 * @method CIUDAD              setTSCB()           Sets the current record's "TS_CB" collection
 * @method CIUDAD              setTSRC()           Sets the current record's "TS_RC" collection
 * @method CIUDAD              setCMCB()           Sets the current record's "CM_CB" collection
 * @method CIUDAD              setDATOSCOMPANIA()  Sets the current record's "DATOS_COMPANIA" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCIUDAD extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CIUDAD');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('PR_PG', array(
             'local' => 'id',
             'foreign' => 'id_ciudad'));

        $this->hasMany('TS_ACT_BEN_REG', array(
             'local' => 'id',
             'foreign' => 'id_ciudad'));

        $this->hasMany('TS_CB', array(
             'local' => 'id',
             'foreign' => 'id_ciudad'));

        $this->hasMany('TS_RC', array(
             'local' => 'id',
             'foreign' => 'id_ciudad'));

        $this->hasMany('CM_CB', array(
             'local' => 'id',
             'foreign' => 'id_ciudad'));

        $this->hasMany('DATOS_COMPANIA', array(
             'local' => 'id',
             'foreign' => 'ciudad'));
    }
}