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

/**
 * BaseIN_TOMA_INVENTARIO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_toma_inventario
 * @property timestamp $fecha_inicio
 * @property timestamp $fecha_fin
 * @property string $descripcion
 * @property integer $anulado
 * @property string $motivo_anu
 * @property timestamp $fecha_anu
 * @property integer $estado
 * @property integer $id_cen_op
 * @property integer $id_estructura
 * @property CENTRO_OPERACION $CENTRO_OPERACION
 * @property IN_ESTRUCTURA $IN_ESTRUCTURA
 * @property Doctrine_Collection $IN_INVENTARIO_DV_TEMPO
 * @property Doctrine_Collection $IN_DETALLE_ASIGNACION
 * @property Doctrine_Collection $IN_ASIGNACION_TOMA
 * 
 * @method integer             getIdTomaInventario()       Returns the current record's "id_toma_inventario" value
 * @method timestamp           getFechaInicio()            Returns the current record's "fecha_inicio" value
 * @method timestamp           getFechaFin()               Returns the current record's "fecha_fin" value
 * @method string              getDescripcion()            Returns the current record's "descripcion" value
 * @method integer             getAnulado()                Returns the current record's "anulado" value
 * @method string              getMotivoAnu()              Returns the current record's "motivo_anu" value
 * @method timestamp           getFechaAnu()               Returns the current record's "fecha_anu" value
 * @method integer             getEstado()                 Returns the current record's "estado" value
 * @method integer             getIdCenOp()                Returns the current record's "id_cen_op" value
 * @method integer             getIdEstructura()           Returns the current record's "id_estructura" value
 * @method CENTRO_OPERACION    getCENTROOPERACION()        Returns the current record's "CENTRO_OPERACION" value
 * @method IN_ESTRUCTURA       getINESTRUCTURA()           Returns the current record's "IN_ESTRUCTURA" value
 * @method Doctrine_Collection getININVENTARIODVTEMPO()    Returns the current record's "IN_INVENTARIO_DV_TEMPO" collection
 * @method Doctrine_Collection getINDETALLEASIGNACION()    Returns the current record's "IN_DETALLE_ASIGNACION" collection
 * @method Doctrine_Collection getINASIGNACIONTOMA()       Returns the current record's "IN_ASIGNACION_TOMA" collection
 * @method IN_TOMA_INVENTARIO  setIdTomaInventario()       Sets the current record's "id_toma_inventario" value
 * @method IN_TOMA_INVENTARIO  setFechaInicio()            Sets the current record's "fecha_inicio" value
 * @method IN_TOMA_INVENTARIO  setFechaFin()               Sets the current record's "fecha_fin" value
 * @method IN_TOMA_INVENTARIO  setDescripcion()            Sets the current record's "descripcion" value
 * @method IN_TOMA_INVENTARIO  setAnulado()                Sets the current record's "anulado" value
 * @method IN_TOMA_INVENTARIO  setMotivoAnu()              Sets the current record's "motivo_anu" value
 * @method IN_TOMA_INVENTARIO  setFechaAnu()               Sets the current record's "fecha_anu" value
 * @method IN_TOMA_INVENTARIO  setEstado()                 Sets the current record's "estado" value
 * @method IN_TOMA_INVENTARIO  setIdCenOp()                Sets the current record's "id_cen_op" value
 * @method IN_TOMA_INVENTARIO  setIdEstructura()           Sets the current record's "id_estructura" value
 * @method IN_TOMA_INVENTARIO  setCENTROOPERACION()        Sets the current record's "CENTRO_OPERACION" value
 * @method IN_TOMA_INVENTARIO  setINESTRUCTURA()           Sets the current record's "IN_ESTRUCTURA" value
 * @method IN_TOMA_INVENTARIO  setININVENTARIODVTEMPO()    Sets the current record's "IN_INVENTARIO_DV_TEMPO" collection
 * @method IN_TOMA_INVENTARIO  setINDETALLEASIGNACION()    Sets the current record's "IN_DETALLE_ASIGNACION" collection
 * @method IN_TOMA_INVENTARIO  setINASIGNACIONTOMA()       Sets the current record's "IN_ASIGNACION_TOMA" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseIN_TOMA_INVENTARIO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('IN_TOMA_INVENTARIO');
        $this->hasColumn('id_toma_inventario', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('fecha_inicio', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_fin', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('descripcion', 'string', 999, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 999,
             ));
        $this->hasColumn('anulado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('motivo_anu', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('fecha_anu', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_cen_op', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_estructura', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('IN_ESTRUCTURA', array(
             'local' => 'id_estructura',
             'foreign' => 'id_estructura'));

        $this->hasMany('IN_INVENTARIO_DV_TEMPO', array(
             'local' => 'id_toma_inventario',
             'foreign' => 'id_toma_inventario'));

        $this->hasMany('IN_DETALLE_ASIGNACION', array(
             'local' => 'id_toma_inventario',
             'foreign' => 'id_toma_inventario'));

        $this->hasMany('IN_ASIGNACION_TOMA', array(
             'local' => 'id_toma_inventario',
             'foreign' => 'id_toma_inventario'));
    }
}