mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
chat select cliente contactos
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Clientes;
|
||||
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class ClienteContactoEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -21,4 +22,14 @@ class ClienteContactoEntity extends \CodeIgniter\Entity\Entity
|
||||
"cliente_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
|
||||
public function getFullName() : string
|
||||
{
|
||||
return trim(implode(" ",[$this->attributes['nombre'] ?? '',$this->attributes["apellidos"] ?? '']));
|
||||
}
|
||||
public function cliente() : ?ClienteEntity
|
||||
{
|
||||
$cm = model(ClienteModel::class);
|
||||
return $cm->find($this->attributes["cliente_id"]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user