Searching system in messages and update status and last seen for users
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user