package com.ruoyi.cai.rank;

import lombok.Data;
import org.redisson.client.protocol.ScoredEntry;

@Data
public class RankNode {
    private Long score;
    private Long userId;

    public RankNode() {
    }

    public static RankNode getNode(ScoredEntry<String> entry){
        RankNode rankNode = new RankNode();
        rankNode.setScore(entry.getScore().longValue());
        rankNode.setUserId(Long.valueOf(entry.getValue()));
        return rankNode;
    }
}
