package com.shkj.wms.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author lch
 */
@Getter
@AllArgsConstructor
public enum NumberOrderTypeEnum {

    /**
     * 1每天递增 2每月递增 3每年递增 0一直递增
     */
    DAY(1, "每天递增"),
    MONTH(2, "每月递增"),
    YEAR(3, "每年递增"),
    ALWAYS(0, "一直递增"),

    ;

    private int value;
    private String desc;

    public static NumberOrderTypeEnum getNumberOrderTypeEnum(int value) {
        for (NumberOrderTypeEnum typeEnum : NumberOrderTypeEnum.values()) {
            if (typeEnum.getValue() == value) {
                return typeEnum;
            }
        }
        return null;
    }

}
