package com.fs.common.enums;

/**
 * @description: 统计维度枚举
 * @author: Guos
 * @time: 2025/11/3 上午11:26
 */
public enum DimensionEnum {

    /**
     * 个人维度
     */
    PERSONAL(1, "个人"),

    /**
     * 公司维度
     */
    COMPANY(2, "公司"),

    /**
     * 部门维度
     */
    DEPARTMENT(3, "部门");

    private final Integer value;
    private final String description;

    DimensionEnum(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public Integer getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 根据值获取枚举
     */
    public static DimensionEnum fromValue(Integer value) {
        for (DimensionEnum dimension : DimensionEnum.values()) {
            if (dimension.getValue().equals(value)) {
                return dimension;
            }
        }
        return null;
    }
}
