mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
feat : duplicar papel impresion con relaciones
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace App\Entities\Configuracion;
|
||||
|
||||
use App\Models\Configuracion\MaquinasPapelesImpresionModel;
|
||||
use App\Models\Configuracion\PapelImpresionMargenModel;
|
||||
use App\Models\Configuracion\PapelImpresionTipologiaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
@ -49,4 +52,20 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"use_for_tapa_dura" => "boolean",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
|
||||
public function tipologia() : ?PapelImpresionTipologia
|
||||
{
|
||||
$m = model(PapelImpresionTipologiaModel::class);
|
||||
return $m->where('papel_impresion_id',$this->attributes["id"])->first();
|
||||
}
|
||||
public function maquinas_impresion() : ?MaquinasPapelesImpresionEntity
|
||||
{
|
||||
$m = model(MaquinasPapelesImpresionModel::class);
|
||||
return $m->where('papel_impresion_id',$this->attributes["id"])->first();
|
||||
}
|
||||
public function margen() : ?PapelImpresionMargen
|
||||
{
|
||||
$m = model(PapelImpresionMargenModel::class);
|
||||
return $m->where('papel_impresion_id',$this->attributes["id"])->first();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user