mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ordenes trabajo
This commit is contained in:
@ -7,6 +7,7 @@ use App\Database\Migrations\OrdenTrabajoDatesTable;
|
||||
use App\Entities\Pedidos\PedidoEntity;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoDate;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoTarea;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoUser;
|
||||
use App\Models\Pedidos\PedidoModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
@ -17,23 +18,41 @@ class OrdenTrabajoEntity extends Entity
|
||||
"pedido_id" => null,
|
||||
"user_created_id" => null,
|
||||
"user_updated_id" => null,
|
||||
"fecha_entrega_warning" => false,
|
||||
"fecha_entrega_warning_revised" => false,
|
||||
"total_tirada" => null,
|
||||
"total_precio" => null,
|
||||
"tipo_entrada" => "out",
|
||||
"progreso" => 0.00,
|
||||
"estado" => "I",
|
||||
"comentarios" => null,
|
||||
"revisar_formato" => false,
|
||||
"revisar_lomo" => false,
|
||||
"revisar_solapa" => false,
|
||||
"revisar_isbn" => false,
|
||||
"revisar_codigo_barras" => false,
|
||||
"realizar_imposicion" => false,
|
||||
"enviar_impresion" => false,
|
||||
];
|
||||
protected $casts = [
|
||||
"pedido_id" => "integer",
|
||||
"user_created_id" => "integer",
|
||||
"user_updated_id" => "?integer",
|
||||
"fecha_entrega_warning" => "bool",
|
||||
"fecha_entrega_warning_revised" => "bool",
|
||||
"total_tirada" => "float",
|
||||
"total_precio" => "float",
|
||||
"tipo_entrada" => "string",
|
||||
"progreso" => "float",
|
||||
"estado" => "string",
|
||||
"comentarios" => "string",
|
||||
"revisar_formato" => "bool",
|
||||
"revisar_lomo" => "bool",
|
||||
"revisar_solapa" => "bool",
|
||||
"revisar_isbn" => "bool",
|
||||
"revisar_codigo_barras" => "bool",
|
||||
"realizar_imposicion" => "bool",
|
||||
"enviar_impresion" => "bool",
|
||||
];
|
||||
|
||||
|
||||
@ -64,9 +83,10 @@ class OrdenTrabajoEntity extends Entity
|
||||
}
|
||||
public function users(): ?OrdenTrabajoUserEntity
|
||||
{
|
||||
return null;
|
||||
// return $m->find($this->attributes["id"])
|
||||
$m = model(OrdenTrabajoUser::class);
|
||||
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