mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ot pdf download
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Entities\Produccion;
|
||||
|
||||
use App\Entities\Usuarios\UserEntity;
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class OrdenTrabajoUserEntity extends Entity
|
||||
@ -10,30 +12,30 @@ class OrdenTrabajoUserEntity extends Entity
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
|
||||
protected $attributes = [
|
||||
"orden_trabajo_id"=> null,
|
||||
"user_created_id"=> null,
|
||||
"user_update_id"=> null,
|
||||
"inaplazable_revised_change_user_id"=> null,
|
||||
"ferro_disponible_hecho_user_id"=> null,
|
||||
"ferro_disponible_ok_user_id"=> null,
|
||||
"ferro_entregado_user_id"=> null,
|
||||
"pendiente_ferro_user_id"=> null,
|
||||
"ferro_en_cliente_user_id"=> null,
|
||||
"ferro_ok_user_id"=> null,
|
||||
"interior_bn_user_id"=> null,
|
||||
"interior_color_user_id"=> null,
|
||||
"preparacion_interior_user_id"=> null,
|
||||
"cubierta_user_id"=> null,
|
||||
"plastificado_user_id"=> null,
|
||||
"encuadernacion_user_id"=> null,
|
||||
"corte_user_id"=> null,
|
||||
"embalaje_user_id"=> null,
|
||||
"entrada_manipulado_user_id"=> null,
|
||||
"pre_formato_user_id"=> null,
|
||||
"pre_lomo_user_id"=> null,
|
||||
"pre_solapa_user_id"=> null,
|
||||
"pre_codbarras_user_id"=> null,
|
||||
"pre_imposicion_user_id"=> null,
|
||||
"orden_trabajo_id" => null,
|
||||
"user_created_id" => null,
|
||||
"user_update_id" => null,
|
||||
"inaplazable_revised_change_user_id" => null,
|
||||
"ferro_disponible_hecho_user_id" => null,
|
||||
"ferro_disponible_ok_user_id" => null,
|
||||
"ferro_entregado_user_id" => null,
|
||||
"pendiente_ferro_user_id" => null,
|
||||
"ferro_en_cliente_user_id" => null,
|
||||
"ferro_ok_user_id" => null,
|
||||
"interior_bn_user_id" => null,
|
||||
"interior_color_user_id" => null,
|
||||
"preparacion_interior_user_id" => null,
|
||||
"cubierta_user_id" => null,
|
||||
"plastificado_user_id" => null,
|
||||
"encuadernacion_user_id" => null,
|
||||
"corte_user_id" => null,
|
||||
"embalaje_user_id" => null,
|
||||
"entrada_manipulado_user_id" => null,
|
||||
"pre_formato_user_id" => null,
|
||||
"pre_lomo_user_id" => null,
|
||||
"pre_solapa_user_id" => null,
|
||||
"pre_codbarras_user_id" => null,
|
||||
"pre_imposicion_user_id" => null,
|
||||
"pre_imprimir_user_id" => null
|
||||
];
|
||||
// protected array $casts = [
|
||||
@ -63,4 +65,21 @@ class OrdenTrabajoUserEntity extends Entity
|
||||
// "pre_imposicion_user_id" => "?integer",
|
||||
// "pre_imprimir_user_id" => "?integer"
|
||||
// ];
|
||||
|
||||
protected function userBy(string $key): ?UserEntity
|
||||
{
|
||||
$user = null;
|
||||
if (isset($this->attributes[$key])) {
|
||||
|
||||
if ($this->attributes[$key]) {
|
||||
$m = model(UserModel::class);
|
||||
$user = $m->find($this->attributes[$key]);
|
||||
}
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
public function getPlastificadoBy() : ?UserEntity
|
||||
{
|
||||
return $this->userBy('plastificado_user_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user