package jnpf.attendance.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 查询维度枚举
 *
 * @author Flynn Chan
 * @create 2025-02-13
 */
@AllArgsConstructor
@Getter
public enum CompareTypeEnums {
    CURRENT(1, "本期"),
    YOY(2, "同比"),
    MOM(3, "环比");

    private final int value;
    private final String text;
    public static CompareTypeEnums getTypeEnums(int value) {
        CompareTypeEnums[] values = CompareTypeEnums.values();
        for (CompareTypeEnums typeEnums : values) {
            if (typeEnums.getValue() == value) {
                return typeEnums;
            }
        }
        return null;
    }
}
