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

/**
 * BaseIN_PARTES_CLASE
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_partes_clase
 * @property integer $id_clase
 * @property integer $id_linea
 * @property string $nombre
 * @property string $descripcion
 * @property decimal $porcentaje
 * @property decimal $valor
 * @property IN_CLASE $IN_CLASE
 * @property IN_CLASE $IN_CLASE_2
 * @property IN_CLASE $IN_CLASE_3
 * @property IN_CLASE $IN_CLASE_4
 * @property Doctrine_Collection $IN_PARTES_INVENTARIO
 * 
 * @method integer             getIdPartesClase()        Returns the current record's "id_partes_clase" value
 * @method integer             getIdClase()              Returns the current record's "id_clase" value
 * @method integer             getIdLinea()              Returns the current record's "id_linea" value
 * @method string              getNombre()               Returns the current record's "nombre" value
 * @method string              getDescripcion()          Returns the current record's "descripcion" value
 * @method decimal             getPorcentaje()           Returns the current record's "porcentaje" value
 * @method decimal             getValor()                Returns the current record's "valor" value
 * @method IN_CLASE            getINCLASE()              Returns the current record's "IN_CLASE" value
 * @method IN_CLASE            getINCLASE2()             Returns the current record's "IN_CLASE_2" value
 * @method IN_CLASE            getINCLASE3()             Returns the current record's "IN_CLASE_3" value
 * @method IN_CLASE            getINCLASE4()             Returns the current record's "IN_CLASE_4" value
 * @method Doctrine_Collection getINPARTESINVENTARIO()   Returns the current record's "IN_PARTES_INVENTARIO" collection
 * @method IN_PARTES_CLASE     setIdPartesClase()        Sets the current record's "id_partes_clase" value
 * @method IN_PARTES_CLASE     setIdClase()              Sets the current record's "id_clase" value
 * @method IN_PARTES_CLASE     setIdLinea()              Sets the current record's "id_linea" value
 * @method IN_PARTES_CLASE     setNombre()               Sets the current record's "nombre" value
 * @method IN_PARTES_CLASE     setDescripcion()          Sets the current record's "descripcion" value
 * @method IN_PARTES_CLASE     setPorcentaje()           Sets the current record's "porcentaje" value
 * @method IN_PARTES_CLASE     setValor()                Sets the current record's "valor" value
 * @method IN_PARTES_CLASE     setINCLASE()              Sets the current record's "IN_CLASE" value
 * @method IN_PARTES_CLASE     setINCLASE2()             Sets the current record's "IN_CLASE_2" value
 * @method IN_PARTES_CLASE     setINCLASE3()             Sets the current record's "IN_CLASE_3" value
 * @method IN_PARTES_CLASE     setINCLASE4()             Sets the current record's "IN_CLASE_4" value
 * @method IN_PARTES_CLASE     setINPARTESINVENTARIO()   Sets the current record's "IN_PARTES_INVENTARIO" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseIN_PARTES_CLASE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('IN_PARTES_CLASE');
        $this->hasColumn('id_partes_clase', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_clase', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_linea', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('nombre', 'string', 150, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 150,
             ));
        $this->hasColumn('descripcion', 'string', 250, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        $this->hasColumn('porcentaje', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('valor', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
    }

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

        $this->hasOne('IN_CLASE as IN_CLASE_2', array(
             'local' => 'id_linea',
             'foreign' => 'id_clase'));

        $this->hasOne('IN_CLASE as IN_CLASE_3', array(
             'local' => 'id_clase',
             'foreign' => 'id_linea'));

        $this->hasOne('IN_CLASE as IN_CLASE_4', array(
             'local' => 'id_linea',
             'foreign' => 'id_linea'));

        $this->hasMany('IN_PARTES_INVENTARIO', array(
             'local' => 'id_partes_clase',
             'foreign' => 'id_partes_clase'));
    }
}