package org.mercury_im.messenger.entity.message;

import java.util.Date;
import java.util.List;
import java.util.UUID;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.With;

@Data
public class Message {
    UUID id;
    String sender;
    String recipient;
    Date timestamp;
    MessageDirection direction;
    List<PayloadContainer> messagePayloads;
    MessageDeliveryState deliveryState;
    MessageMetadata metadata;

    public boolean isIncoming() {
        return getDirection() == MessageDirection.incoming;
    }
}
