package com.gyee.wisdom.alarm.sharding.entity;

import lombok.Data;

@Data
public class Early implements Comparable<Early> {
    String name;
    double score;

    public Early(String name1,double score1){
        name = name1;
        score = score1;
    }

    @Override
    public int compareTo(Early user) {
        if (this.score > user.score) {
            return 1;
        } else if (this.score == user.score) {
            return 0;
        } else {
            return -1;
        }
    }
}
