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

/**
 * BaseESTRATEGIA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_estrategia
 * @property integer $tipo
 * @property string $nombre
 * @property string $descripcion
 * @property Doctrine_Collection $MATERIAL_REPLICA
 * @property Doctrine_Collection $NECESIDAD_ESTRATEGIA
 * 
 * @method integer             getIdEstrategia()         Returns the current record's "id_estrategia" value
 * @method integer             getTipo()                 Returns the current record's "tipo" value
 * @method string              getNombre()               Returns the current record's "nombre" value
 * @method string              getDescripcion()          Returns the current record's "descripcion" value
 * @method Doctrine_Collection getMATERIALREPLICA()      Returns the current record's "MATERIAL_REPLICA" collection
 * @method Doctrine_Collection getNECESIDADESTRATEGIA()  Returns the current record's "NECESIDAD_ESTRATEGIA" collection
 * @method ESTRATEGIA          setIdEstrategia()         Sets the current record's "id_estrategia" value
 * @method ESTRATEGIA          setTipo()                 Sets the current record's "tipo" value
 * @method ESTRATEGIA          setNombre()               Sets the current record's "nombre" value
 * @method ESTRATEGIA          setDescripcion()          Sets the current record's "descripcion" value
 * @method ESTRATEGIA          setMATERIALREPLICA()      Sets the current record's "MATERIAL_REPLICA" collection
 * @method ESTRATEGIA          setNECESIDADESTRATEGIA()  Sets the current record's "NECESIDAD_ESTRATEGIA" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseESTRATEGIA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ESTRATEGIA');
        $this->hasColumn('id_estrategia', 'integer', 10, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 10,
             ));
        $this->hasColumn('tipo', 'integer', 10, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 10,
             ));
        $this->hasColumn('nombre', 'string', 300, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 300,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('MATERIAL_REPLICA', array(
             'local' => 'id_estrategia',
             'foreign' => 'estrategia'));

        $this->hasMany('NECESIDAD_ESTRATEGIA', array(
             'local' => 'id_estrategia',
             'foreign' => 'id_estrategia'));
    }
}