package envoy.event;
import java.time.LocalDateTime;
import envoy.data.GroupMessage;
import envoy.data.Message.MessageStatus;
/**
* Project: envoy-common
* File: GroupMessageStatusChange.java
* Created: 18.04.2020
*
* @author Maximilian Käfer
* @since Envoy Common v0.1-beta
*/
public class GroupMessageStatusChange extends MessageStatusChange {
private final long memberID;
private static final long serialVersionUID = 0L;
/**
* Initializes a {@link GroupMessageStatusChange}.
*
* @param id the ID of the {@link GroupMessage} this event is related to
* @param status the status of this specific members {@link GroupMessage}
* @param date the date at which the MessageStatus change occurred for
* this specific member
* @param memberID the ID of the group member that caused the status change
* @since Envoy Common v0.1-beta
*/
public GroupMessageStatusChange(long id, MessageStatus status, LocalDateTime date, long memberID) {
super(id, status, date);
this.memberID = memberID;
}
/**
* @return the memberID which the user who sends this event has
* @since Envoy Common v0.1-beta
*/
public long getMemberID() { return memberID; }
@Override
public String toString() { return String.format("GroupMessageStatusChange[meta=%s,memberID=%d]", super.toString(), memberID); }
}