mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 23:41:09 +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;
|
||||
|
||||
import com.pqt.core.entities.members.PqtMember;
|
||||
import com.pqt.core.entities.user_account.Account;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -12,15 +13,19 @@ public class Message {
|
||||
private Map<String, String> fields;
|
||||
private MessageType type;
|
||||
private PqtMember emitter, receiver;
|
||||
private Account user;
|
||||
private Message replyTo;
|
||||
|
||||
public Message(MessageType type, PqtMember emitter, PqtMember receiver) {
|
||||
this(type, emitter, receiver, null);
|
||||
public Message(MessageType type, PqtMember emitter, PqtMember receiver, Account user, Message replyTo) {
|
||||
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.receiver = receiver;
|
||||
this.type = type;
|
||||
this.user = user;
|
||||
this.replyTo = replyTo;
|
||||
this.fields = new HashMap<>();
|
||||
if(fields!=null)
|
||||
for(String key : fields.keySet()){
|
||||
@ -51,4 +56,12 @@ public class Message {
|
||||
public MessageType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Account getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public Message getReplyTo() {
|
||||
return replyTo;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user