package com.sikey.wa04.business.domain.entity.message;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@AllArgsConstructor
public class MessageId implements Comparable<MessageId> {
    private Long id;

    @Override
    public int compareTo(MessageId o) {
        return o.getId().compareTo(getId());
    }

    public boolean greaterThan(Long id) {
        return this.id >= id;
    }
}
