Searching system in messages and update status and last seen for users

This commit is contained in:
2025-06-09 14:50:35 +03:30
parent 8b6c4fea97
commit be9cde5c6b
6 changed files with 251 additions and 21 deletions
@@ -1,19 +1,24 @@
package org.to.telegramfinalproject.Models;
import org.json.JSONObject;
public class SearchRequestModel {
private String action;
private String keyword;
private String user_id;
public SearchRequestModel(String action, String keyword) {
public SearchRequestModel(String action, String keyword, String user_id) {
this.action = action;
this.keyword = keyword;
this.user_id = user_id;
}
public String getAction() {
return action;
}
public String getKeyword() {
return keyword;
public JSONObject toJson() {
JSONObject json = new JSONObject();
json.put("action", action);
json.put("keyword", keyword);
json.put("user_id", user_id);
return json;
}
}