avances de hoy

This commit is contained in:
imnavajas
2024-07-06 22:44:29 +02:00
parent 26f3057bbe
commit f46a03e66d
9 changed files with 720 additions and 30 deletions

View File

@ -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()
{