package de.cannamanage.domain.entity;

import java.io.Serializable;
import java.util.Objects;
import java.util.UUID;

/**
 * Composite primary key for NotificationSendRecipient.
 */
public class NotificationSendRecipientId implements Serializable {

    private UUID sendId;
    private UUID userId;

    public NotificationSendRecipientId() {}

    public NotificationSendRecipientId(UUID sendId, UUID userId) {
        this.sendId = sendId;
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NotificationSendRecipientId that = (NotificationSendRecipientId) o;
        return Objects.equals(sendId, that.sendId) && Objects.equals(userId, that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sendId, userId);
    }
}
