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

/**
 * BaseIN_DESAGREGACION_INV
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_desagregacion_inv
 * @property integer $id_inventario_dv_padre
 * @property integer $id_inventario_dv_hijo
 * @property integer $id_partes_inventario
 * @property decimal $costo_inicialh_padre
 * @property decimal $costo_actualh_padre
 * @property  $fecha_desagrega
 * @property integer $id_usuario
 * @property decimal $porcentaje
 * @property IN_INVENTARIO_DV $IN_INVENTARIO_DV
 * @property IN_PARTES_INVENTARIO $IN_PARTES_INVENTARIO
 * @property IN_INVENTARIO_DV $IN_INVENTARIO_DV_3
 * @property USUARIOS $USUARIOS
 * 
 * @method integer              getIdDesagregacionInv()     Returns the current record's "id_desagregacion_inv" value
 * @method integer              getIdInventarioDvPadre()    Returns the current record's "id_inventario_dv_padre" value
 * @method integer              getIdInventarioDvHijo()     Returns the current record's "id_inventario_dv_hijo" value
 * @method integer              getIdPartesInventario()     Returns the current record's "id_partes_inventario" value
 * @method decimal              getCostoInicialhPadre()     Returns the current record's "costo_inicialh_padre" value
 * @method decimal              getCostoActualhPadre()      Returns the current record's "costo_actualh_padre" value
 * @method integer              getIdUsuario()              Returns the current record's "id_usuario" value
 * @method decimal              getPorcentaje()             Returns the current record's "porcentaje" value
 * @method IN_INVENTARIO_DV     getININVENTARIODV()         Returns the current record's "IN_INVENTARIO_DV" value
 * @method IN_PARTES_INVENTARIO getINPARTESINVENTARIO()     Returns the current record's "IN_PARTES_INVENTARIO" value
 * @method IN_INVENTARIO_DV     getININVENTARIODV3()        Returns the current record's "IN_INVENTARIO_DV_3" value
 * @method USUARIOS             getUSUARIOS()               Returns the current record's "USUARIOS" value
 * @method IN_DESAGREGACION_INV setIdDesagregacionInv()     Sets the current record's "id_desagregacion_inv" value
 * @method IN_DESAGREGACION_INV setIdInventarioDvPadre()    Sets the current record's "id_inventario_dv_padre" value
 * @method IN_DESAGREGACION_INV setIdInventarioDvHijo()     Sets the current record's "id_inventario_dv_hijo" value
 * @method IN_DESAGREGACION_INV setIdPartesInventario()     Sets the current record's "id_partes_inventario" value
 * @method IN_DESAGREGACION_INV setCostoInicialhPadre()     Sets the current record's "costo_inicialh_padre" value
 * @method IN_DESAGREGACION_INV setCostoActualhPadre()      Sets the current record's "costo_actualh_padre" value
 * @method IN_DESAGREGACION_INV setIdUsuario()              Sets the current record's "id_usuario" value
 * @method IN_DESAGREGACION_INV setPorcentaje()             Sets the current record's "porcentaje" value
 * @method IN_DESAGREGACION_INV setININVENTARIODV()         Sets the current record's "IN_INVENTARIO_DV" value
 * @method IN_DESAGREGACION_INV setINPARTESINVENTARIO()     Sets the current record's "IN_PARTES_INVENTARIO" value
 * @method IN_DESAGREGACION_INV setININVENTARIODV3()        Sets the current record's "IN_INVENTARIO_DV_3" value
 * @method IN_DESAGREGACION_INV setUSUARIOS()               Sets the current record's "USUARIOS" value
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseIN_DESAGREGACION_INV extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('IN_DESAGREGACION_INV');
        $this->hasColumn('id_desagregacion_inv', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_inventario_dv_padre', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_inventario_dv_hijo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_partes_inventario', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('costo_inicialh_padre', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('costo_actualh_padre', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('fecha_desagrega', '', 11, array(
             'notnull' => true,
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'type' => '',
             'length' => '11',
             ));
        $this->hasColumn('id_usuario', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('porcentaje', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
    }

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

        $this->hasOne('IN_PARTES_INVENTARIO', array(
             'local' => 'id_partes_inventario',
             'foreign' => 'id_partes_inventario'));

        $this->hasOne('IN_INVENTARIO_DV as IN_INVENTARIO_DV_3', array(
             'local' => 'id_inventario_dv_hijo',
             'foreign' => 'id_inventario_dv'));

        $this->hasOne('USUARIOS', array(
             'local' => 'id_usuario',
             'foreign' => 'id'));
    }
}