package cn.sikey.websocket.message;

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

/**
 * @Author: nelson
 * @Date: 2025/5/29
 * @Description: 消息id
 */
@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;
    }
}
