package com.ltgk.boat.enums;

/**
 * @Author: w1826
 * @Description: 轨迹抽希比例枚举
 * @Date: 2025/4/8 11:12
 * @Version: 1.0
 */
public enum BoatTrajectoryEnums {
    //    1w以上 100抽1
//    5k-1w 50抽1
//    1k-5k 20抽1
//    500-1k 10抽1
//    500-100  5抽1
//    100-50  2抽1
//    50 一下  不抽
    ZERO_TO_ONE_W(100000L, 1000000L, 500),
    FIVE_TO_ONE_W(50000L, 100000L, 200),
    ONE_W(10000L, 50000L, 100),
    FIVE_K(5000L, 9999L, 50),
    ONE_K(1000L, 4999L, 20),
    FIVE_HUNDRED(500L, 999L, 10),
    LESS_THAN_FIVE_HUNDRED(100L, 499L, 5),
    LESS_THAN_ONE_HUNDRED(50L, 99L, 2),
    LESS_THAN_FIFTY(0L, 49L, 0);

    private Long min;
    private Long max;
    private Integer draw;

    BoatTrajectoryEnums(Long min, Long max, Integer draw) {
        this.min = min;
        this.max = max;
        this.draw = draw;
    }

    public static Integer getDraw(Long num) {
        for (BoatTrajectoryEnums boatTrajectoryEnums : BoatTrajectoryEnums.values()) {
            if (num >= boatTrajectoryEnums.min && num <= boatTrajectoryEnums.max) {
                return boatTrajectoryEnums.draw;
            }
        }
        return null;
    }
}
