add client to chat

This commit is contained in:
amazuecos
2025-03-17 06:50:35 +01:00
parent 55157d23aa
commit 3662613ba5
7 changed files with 248 additions and 108 deletions

View File

@ -15,7 +15,10 @@ class ChatDeparmentUserModel extends Model
protected $protectFields = true;
protected $allowedFields = [
"chat_department_id",
"user_id"
"user_id",
"pedido_id",
"factura_id",
"presupuesto_id"
];
protected bool $allowEmptyInserts = false;
@ -47,6 +50,7 @@ class ChatDeparmentUserModel extends Model
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
public function getChatDepartmentUser(int $user_id)
{
return $this->db->table($this->table." t1")
@ -55,6 +59,5 @@ class ChatDeparmentUserModel extends Model
->where("t1.user_id",$user_id)
->where("t1.deleted_at",null)
->get()->getResultObject();
}
}