mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
avances de hoy
This commit is contained in:
@ -20,7 +20,29 @@ class ParticipanteModel extends BaseModel
|
||||
'last_read',
|
||||
];
|
||||
|
||||
protected $useTimestamps = true;
|
||||
public function getPeopleInChat($conversacionId){
|
||||
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->where("t1.conversacion_id", $conversacionId);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function getChatsByUser($userId){
|
||||
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select("t1.conversacion_id AS id, t2.asunto AS asunto")
|
||||
->where("t1.usuario_id", $userId)
|
||||
->join("chat_conversaciones t2", "t2.id = conversacion_id", "left")
|
||||
->orderBy('t1.created_at', 'DESC')
|
||||
->get()
|
||||
->getResultObject();
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
|
||||
public function getCustomer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user