Files
safekat/ci4/app/Entities/Tarifas/TarifaManipuladoEntity.php
2025-05-05 07:53:36 +02:00

42 lines
1.0 KiB
PHP
Executable File

<?php
namespace App\Entities\Tarifas;
use CodeIgniter\Entity;
class TarifaManipuladoEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
"id" => null,
"nombre" => null,
"code" => null,
"comment" => null,
"precio_min" => 0,
"importe_fijo" => 0,
"mostrar_en_presupuesto" => 1,
"mostrar_en_presupuesto_cliente" => 0,
"user_created_id" => 0,
"user_updated_id" => 0,
"is_deleted" => 0,
"deleted_at" => null,
"created_at" => null,
"updated_at" => null,
];
protected $casts = [
"precio_min" => "float",
"importe_fijo" => "float",
"code" => "string",
"comment" => "string",
"mostrar_en_presupuesto" => "int",
"mostrar_en_presupuesto_cliente" => "bool",
"user_created_id" => "int",
"user_updated_id" => "int",
"is_deleted" => "int",
];
public function isCosido(): bool
{
return in_array($this->attributes['id'], [2, 3, 17, 45]);
}
}