
package com.tmerclub.cloud.distribution.constant;

/**
 * 分销金额类型： 1直推 2间推
 *
 * @author cl
 * @date 2021-08-16 14:06:36
 */
public enum DistributionAmountEnum {
    /**
     * 未通过
     */
    DIRECT_PUSH(1, "直推"),
    /**
     * 未审核
     */
    INTERPENETRATION(2, "间推");

    private final int value;
    private final String desc;

    public Integer value() {
        return value;
    }

    public String desc() {
        return desc;
    }

    DistributionAmountEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static DistributionAmountEnum instance(Integer value) {
        DistributionAmountEnum[] enums = values();
        for (DistributionAmountEnum stateEnum : enums) {
            if (stateEnum.value().equals(value)) {
                return stateEnum;
            }
        }
        return null;
    }
}
