mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
36 lines
899 B
PHP
36 lines
899 B
PHP
<?php
|
|
namespace App\Entities\Pedidos;
|
|
|
|
use App\Entities\Configuracion\UbicacionesEntity;
|
|
use App\Models\Configuracion\UbicacionesModel;
|
|
use CodeIgniter\Entity;
|
|
|
|
class PedidoLineaEntity extends \CodeIgniter\Entity\Entity
|
|
{
|
|
protected $attributes = [
|
|
"id" => null,
|
|
"pedido_id" => null,
|
|
"presupuesto_id" => null,
|
|
"ubicacion_id" => null,
|
|
"user_created_id" => null,
|
|
"user_updated_id" => null,
|
|
"created_at" => null,
|
|
"updated_at" => null,
|
|
"cantidad" => null,
|
|
"descripcion" => null,
|
|
];
|
|
|
|
|
|
protected $casts = [
|
|
"pedido_id" => "int",
|
|
"presupuesto_id" => "int",
|
|
"ubicacion_id" => "int",
|
|
"cantidad" => "int",
|
|
];
|
|
public function ubicacion() : UbicacionesEntity
|
|
{
|
|
$m = model(UbicacionesModel::class);
|
|
return $m->find($this->attributes["ubicacion_id"]);
|
|
}
|
|
}
|