mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ot
This commit is contained in:
@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Entities\Produccion;
|
||||
|
||||
use App\Controllers\Produccion\Ordentrabajo;
|
||||
use App\Database\Migrations\OrdenTrabajoDatesTable;
|
||||
use App\Entities\Pedidos\PedidoEntity;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoDate;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoTarea;
|
||||
use App\Models\Pedidos\PedidoModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
@ -50,12 +52,21 @@ class OrdenTrabajoEntity extends Entity
|
||||
*
|
||||
* @return PedidoEntity
|
||||
*/
|
||||
public function pedido(): PedidoEntity
|
||||
public function pedido(): ?PedidoEntity
|
||||
{
|
||||
$m = model(PedidoModel::class);
|
||||
return $m->find($this->attributes["pedido_id"]);
|
||||
}
|
||||
|
||||
public function dates(): ?OrdenTrabajoDateEntity
|
||||
{
|
||||
$m = model(OrdenTrabajoDate::class);
|
||||
return $m->find($this->attributes["id"]);
|
||||
}
|
||||
public function users(): ?OrdenTrabajoUserEntity
|
||||
{
|
||||
return null;
|
||||
// return $m->find($this->attributes["id"])
|
||||
}
|
||||
/**
|
||||
* Almacena en la tabla `orden_trabajo_dates` las fechas correspondientes del pedido.
|
||||
* Se almacenan en una tabla externa porque puede haber modificaciones de estas fechas
|
||||
|
||||
Reference in New Issue
Block a user