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

/**
 * BaseRE_MINERAL
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_mineral
 * @property string $cod_mineral
 * @property string $descripcion
 * @property integer $id_ts_bc
 * @property integer $id_ts_cb
 * @property integer $estado
 * @property TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property Doctrine_Collection $TS_MOV_BANC
 * @property Doctrine_Collection $TS_DIS_REG
 * @property Doctrine_Collection $TR_DIS_VAL
 * @property Doctrine_Collection $RE_RECAUDO
 * @property Doctrine_Collection $RE_DISTRIBUCION
 * @property Doctrine_Collection $CM_MOV_BANC
 * 
 * @method integer             getIdMineral()       Returns the current record's "id_mineral" value
 * @method string              getCodMineral()      Returns the current record's "cod_mineral" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method integer             getIdTsBc()          Returns the current record's "id_ts_bc" value
 * @method integer             getIdTsCb()          Returns the current record's "id_ts_cb" value
 * @method integer             getEstado()          Returns the current record's "estado" value
 * @method TS_BN               getTSBN()            Returns the current record's "TS_BN" value
 * @method TS_CB               getTSCB()            Returns the current record's "TS_CB" value
 * @method Doctrine_Collection getTSMOVBANC()       Returns the current record's "TS_MOV_BANC" collection
 * @method Doctrine_Collection getTSDISREG()        Returns the current record's "TS_DIS_REG" collection
 * @method Doctrine_Collection getTRDISVAL()        Returns the current record's "TR_DIS_VAL" collection
 * @method Doctrine_Collection getRERECAUDO()       Returns the current record's "RE_RECAUDO" collection
 * @method Doctrine_Collection getREDISTRIBUCION()  Returns the current record's "RE_DISTRIBUCION" collection
 * @method Doctrine_Collection getCMMOVBANC()       Returns the current record's "CM_MOV_BANC" collection
 * @method RE_MINERAL          setIdMineral()       Sets the current record's "id_mineral" value
 * @method RE_MINERAL          setCodMineral()      Sets the current record's "cod_mineral" value
 * @method RE_MINERAL          setDescripcion()     Sets the current record's "descripcion" value
 * @method RE_MINERAL          setIdTsBc()          Sets the current record's "id_ts_bc" value
 * @method RE_MINERAL          setIdTsCb()          Sets the current record's "id_ts_cb" value
 * @method RE_MINERAL          setEstado()          Sets the current record's "estado" value
 * @method RE_MINERAL          setTSBN()            Sets the current record's "TS_BN" value
 * @method RE_MINERAL          setTSCB()            Sets the current record's "TS_CB" value
 * @method RE_MINERAL          setTSMOVBANC()       Sets the current record's "TS_MOV_BANC" collection
 * @method RE_MINERAL          setTSDISREG()        Sets the current record's "TS_DIS_REG" collection
 * @method RE_MINERAL          setTRDISVAL()        Sets the current record's "TR_DIS_VAL" collection
 * @method RE_MINERAL          setRERECAUDO()       Sets the current record's "RE_RECAUDO" collection
 * @method RE_MINERAL          setREDISTRIBUCION()  Sets the current record's "RE_DISTRIBUCION" collection
 * @method RE_MINERAL          setCMMOVBANC()       Sets the current record's "CM_MOV_BANC" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_MINERAL extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_MINERAL');
        $this->hasColumn('id_mineral', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('cod_mineral', 'string', 4, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('descripcion', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_bc', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_cb', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1
                ',
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('TS_CB', array(
             'local' => 'id_ts_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('TS_MOV_BANC', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral_cb'));

        $this->hasMany('TS_DIS_REG', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral'));

        $this->hasMany('TR_DIS_VAL', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral'));

        $this->hasMany('RE_RECAUDO', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral'));

        $this->hasMany('RE_DISTRIBUCION', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral'));

        $this->hasMany('CM_MOV_BANC', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral_cb'));
    }
}