Skip to content

Commit

Permalink
Fix: Add DeviceID and Device Type to User spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam committed Jul 18, 2021
1 parent 3112988 commit 8d2b7a4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/main/java/messagerosa/core/model/DeviceType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package messagerosa.core.model;

public enum DeviceType {
PHONE("phone");

private String name;

DeviceType(String deviceType) {
name=deviceType;
}

public String toString(){
return name;
}

public static String getEnumByString(String code){
for(DeviceType e : DeviceType.values()){
if(e.name.equals(code)) return e.name();
}
return null;
}
}
4 changes: 2 additions & 2 deletions src/main/java/messagerosa/core/model/SenderReceiverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class SenderReceiverInfo {

// persist
private String userID;

private ArrayList<String> groups;

private String campaignID;
private String formID;
private boolean bot;
private boolean broadcast;
private Map<String, String> meta;
private DeviceType deviceType;
private String deviceID;
}

0 comments on commit 8d2b7a4

Please sign in to comment.