package com.cf.imes.framework.common.enums;

/**
 * 生产单统计维度单位
 * @author Gqr
 * @since 2024/8/6 10:04
 */
public enum OrderStatisticsUnit {
    //季度、月、周、日
    QUARTER(0),
    MONTH(1),
    WEEK(2),
    DAY(3);

    OrderStatisticsUnit(Integer value) {
        this.value = value;
    }

    private Integer value;

    public Integer getValue() {
        return value;
    }

    // from value
    public static OrderStatisticsUnit fromValue(Integer value) {
        for (OrderStatisticsUnit unit : OrderStatisticsUnit.values()) {
            if (unit.getValue().equals(value)) {
                return unit;
            }
        }
        return null;
    }
}
