mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ots
This commit is contained in:
@ -1,7 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
use App\Entities\Configuracion\Maquina as MaquinaEntity;
|
||||
use App\Entities\Configuracion\MaquinasTarifasImpresionEntity;
|
||||
use App\Entities\Configuracion\PapelGenerico;
|
||||
use App\Entities\Configuracion\PapelImpresion;
|
||||
use App\Entities\Tarifas\TarifapreimpresionEntity;
|
||||
use App\Models\Configuracion\MaquinasTarifasImpresionModel;
|
||||
use App\Models\Configuracion\PapelGenericoModel;
|
||||
use App\Models\Configuracion\PapelImpresionModel;
|
||||
|
||||
class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
@ -141,5 +151,45 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_impresion" => "double",
|
||||
"total_linea" => "double",
|
||||
];
|
||||
|
||||
/**
|
||||
* Devuelve la entity MaquinaEntity asociada a esta linea de presupuesto
|
||||
*
|
||||
* @return MaquinaEntity
|
||||
*/
|
||||
public function maquina(): MaquinaEntity
|
||||
{
|
||||
$m = model(MaquinaModel::class);
|
||||
return $m->find($this->attributes["maquina_id"]);
|
||||
}
|
||||
/**
|
||||
* Devuelve la entity PapelImpresion asociada a esta linea de presupuesto.
|
||||
*
|
||||
* @return PapelImpresion
|
||||
*/
|
||||
public function papel_impresion(): PapelImpresion
|
||||
{
|
||||
$m = model(PapelImpresionModel::class);
|
||||
return $m->find($this->attributes['papel_impresion_id']);
|
||||
}
|
||||
/**
|
||||
* Devuelve la entity PapelGenerico asociada a esta linea de presupuesto.
|
||||
*
|
||||
* @return PapelGenerico
|
||||
*/
|
||||
public function papel_generico(): PapelGenerico
|
||||
{
|
||||
$m = model(PapelGenericoModel::class);
|
||||
return $m->find($this->attributes['papel_id']);
|
||||
}
|
||||
/**
|
||||
* Devuelve la entity MaquinasTarifasImpresionEntity asociada a esta linea de presupuesto.
|
||||
*
|
||||
* @return MaquinasTarifasImpresionEntity
|
||||
*/
|
||||
public function tarifa_impresion(): MaquinasTarifasImpresionEntity
|
||||
{
|
||||
$m = model(MaquinasTarifasImpresionModel::class);
|
||||
return $m->find($this->attributes['tarifa_impresion_id']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user