mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-23 07:51:08 +00:00
Clss Message : ajout attribut user et replyTo
This commit is contained in:
parent
99093a39c7
commit
c411409249
@ -1,6 +1,7 @@
|
|||||||
package com.pqt.core.entities.messages;
|
package com.pqt.core.entities.messages;
|
||||||
|
|
||||||
import com.pqt.core.entities.members.PqtMember;
|
import com.pqt.core.entities.members.PqtMember;
|
||||||
|
import com.pqt.core.entities.user_account.Account;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -12,15 +13,19 @@ public class Message {
|
|||||||
private Map<String, String> fields;
|
private Map<String, String> fields;
|
||||||
private MessageType type;
|
private MessageType type;
|
||||||
private PqtMember emitter, receiver;
|
private PqtMember emitter, receiver;
|
||||||
|
private Account user;
|
||||||
|
private Message replyTo;
|
||||||
|
|
||||||
public Message(MessageType type, PqtMember emitter, PqtMember receiver) {
|
public Message(MessageType type, PqtMember emitter, PqtMember receiver, Account user, Message replyTo) {
|
||||||
this(type, emitter, receiver, null);
|
this(type, emitter, receiver, user, replyTo, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Message(MessageType type, PqtMember emitter, PqtMember receiver, Map<String, String> fields) {
|
public Message(MessageType type, PqtMember emitter, PqtMember receiver, Account user, Message replyTo, Map<String, String> fields) {
|
||||||
this.emitter = emitter;
|
this.emitter = emitter;
|
||||||
this.receiver = receiver;
|
this.receiver = receiver;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
this.user = user;
|
||||||
|
this.replyTo = replyTo;
|
||||||
this.fields = new HashMap<>();
|
this.fields = new HashMap<>();
|
||||||
if(fields!=null)
|
if(fields!=null)
|
||||||
for(String key : fields.keySet()){
|
for(String key : fields.keySet()){
|
||||||
@ -51,4 +56,12 @@ public class Message {
|
|||||||
public MessageType getType() {
|
public MessageType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Account getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Message getReplyTo() {
|
||||||
|
return replyTo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user