Files
safekat/ci4/app/Models/OrdenTrabajo/OrdenTrabajoUser.php
2025-03-26 23:29:19 +01:00

80 lines
2.2 KiB
PHP

<?php
namespace App\Models\OrdenTrabajo;
use App\Entities\Produccion\OrdenTrabajoUserEntity;
use CodeIgniter\Database\MySQLi\Builder;
use CodeIgniter\Model;
class OrdenTrabajoUser extends Model
{
protected $table = 'orden_trabajo_users';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = OrdenTrabajoUserEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"orden_trabajo_id",
"user_created_id",
"user_update_id",
"inaplazable_revised_change_user_id",
"ferro_disponible_hecho_user_id",
"ferro_disponible_ok_user_id",
"ferro_entregado_user_id",
"pendiente_ferro_user_id",
"ferro_en_cliente_user_id",
"ferro_ok_user_id",
"interior_bn_user_id",
"interior_color_user_id",
"preparacion_interior_user_id",
"cubierta_user_id",
"plastificado_user_id",
"encuadernacion_user_id",
"corte_user_id",
"embalaje_user_id",
"entrada_manipulado_user_id",
"pre_formato_user_id",
"pre_lomo_user_id",
"pre_solapa_user_id",
"pre_codbarras_user_id",
"pre_imposicion_user_id",
"pre_imprimir_user_id"
];
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 = [];
}