diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java new file mode 100644 index 0000000..0832a69 --- /dev/null +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -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; + } +} diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index 5b9315b..92ee556 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -19,12 +19,12 @@ public class SenderReceiverInfo { // persist private String userID; - private ArrayList groups; - private String campaignID; private String formID; private boolean bot; private boolean broadcast; private Map meta; + private DeviceType deviceType; + private String deviceID; }