mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
153 lines
4.3 KiB
PHP
153 lines
4.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models\OrdenTrabajo;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class OrdenTrabajoModel extends Model
|
|
{
|
|
protected $table = 'ots';
|
|
protected $primaryKey = 'id';
|
|
protected $useAutoIncrement = true;
|
|
protected $returnType = 'array';
|
|
protected $useSoftDeletes = true;
|
|
protected $protectFields = true;
|
|
protected $allowedFields = [
|
|
"user_created_id",
|
|
"user_update_id",
|
|
"maquina_orden_negro_id",
|
|
"maquina_orden_color_id",
|
|
"maquina_orden_portada_id",
|
|
"maquina_orden_cubierta_id",
|
|
"negro_forma_id",
|
|
"color_forma_id",
|
|
"portada_forma_id",
|
|
"cubierta_forma_id",
|
|
"tirada",
|
|
"negro_pliegos_pedido",
|
|
"color_pliegos_pedido",
|
|
"portada_pliegos_pedido",
|
|
"cubierta_pliegos_pedido",
|
|
"negro_clicks_pedido",
|
|
"color_clicks_pedido",
|
|
"portada_clicks_pedido",
|
|
"cubierta_clicks_pedido",
|
|
"pliegos1",
|
|
"paginas1",
|
|
"pliegos2",
|
|
"paginas2",
|
|
"negro_proveedor_nombre",
|
|
"color_proveedor_nombre",
|
|
"portada_proveedor_nombre",
|
|
"corte_pie",
|
|
"lomo",
|
|
"tipo_entrada",
|
|
"fecha_entrada_at",
|
|
"fecha_entrega_at",
|
|
"fecha_entrega_change_at",
|
|
"fecha_entrega_change_user_id",
|
|
"fecha_entrega_real_at",
|
|
"fecha_entrega_real_warning",
|
|
"fecha_impresion_at",
|
|
"fecha_encuardernado_at",
|
|
"fecha_externo_at",
|
|
"fecha_entrega_warning",
|
|
"fecha_entrega_warning_revised",
|
|
"fecha_entrega_warning_revised",
|
|
"inaplazable_revised_change_user_id",
|
|
"pendiente_ferro_at",
|
|
"ferro_en_cliente_at",
|
|
"ferro_ok_at",
|
|
"interior_bn_at",
|
|
"interior_color_at",
|
|
"preparacion_interiores_at",
|
|
"cubierta_at",
|
|
"plastificado_at",
|
|
"encuadernacion_at",
|
|
"corte_at",
|
|
"embalaje_at",
|
|
"envio_at",
|
|
"entrada_manipulado_at",
|
|
"ferro_disponible",
|
|
"ferro_disponible_thread_id",
|
|
"ferro_disponible_hecho_at",
|
|
"ferro_disponible_hecho_user_id",
|
|
"ferro_disponible_ok_at",
|
|
"ferro_disponible_ok_user_id",
|
|
"ferro_entregado_user_id",
|
|
"ferro_entregado_at",
|
|
"pendiente_ferro_user_id",
|
|
"ferro_en_cliente_user_id",
|
|
"ferro_ok_user_id",
|
|
"ferro_cp",
|
|
"ferro_proveedor",
|
|
"ferro_tracking",
|
|
"interior_bn_user_id",
|
|
"interior_color_user_id",
|
|
"preparacion_interior_user_id",
|
|
"cubierda_user_id",
|
|
"plastificado_user_id",
|
|
"encuadernacion_user_id",
|
|
"corte_user_id",
|
|
"embalaje_user_id",
|
|
"envio_user_id",
|
|
"entrada_manipulado_user_id",
|
|
"pre_formato",
|
|
"pre_formato_at",
|
|
"pre_formato_user_id",
|
|
"pre_lomo",
|
|
"pre_lomo_at",
|
|
"pre_lomo_user_id",
|
|
"pre_solapa",
|
|
"pre_solapa_at",
|
|
"pre_solapa_user_id",
|
|
"pre_isbn",
|
|
"pre_isbn_user_id",
|
|
"pre_codbarras",
|
|
"pre_codbarras_at",
|
|
"pre_codbarras_user_id",
|
|
"pre_imposicion",
|
|
"pre_imposicion_at",
|
|
"pre_imposicion_user_id",
|
|
"pre_imprimir",
|
|
"pre_imprimir_user_id",
|
|
"pre_faltan_materiales",
|
|
"pre_imprimir_user_id",
|
|
"pre_faltan_materiales_note",
|
|
"progreso",
|
|
"message_production_send",
|
|
"finalizado",
|
|
"comentarios"
|
|
];
|
|
|
|
protected bool $allowEmptyInserts = false;
|
|
protected bool $updateOnlyChanged = true;
|
|
|
|
protected array $casts = [];
|
|
protected array $castHandlers = [];
|
|
|
|
// Dates
|
|
protected $useTimestamps = true;
|
|
protected $dateFormat = 'datetime';
|
|
protected $createdField = 'created_at';
|
|
protected $updatedField = 'updated_at';
|
|
protected $deletedField = 'deleted_at';
|
|
|
|
// Validation
|
|
protected $validationRules = [];
|
|
protected $validationMessages = [];
|
|
protected $skipValidation = false;
|
|
protected $cleanValidationRules = true;
|
|
|
|
// Callbacks
|
|
protected $allowCallbacks = true;
|
|
protected $beforeInsert = [];
|
|
protected $afterInsert = [];
|
|
protected $beforeUpdate = [];
|
|
protected $afterUpdate = [];
|
|
protected $beforeFind = [];
|
|
protected $afterFind = [];
|
|
protected $beforeDelete = [];
|
|
protected $afterDelete = [];
|
|
}
|