package com.tmerclub.cloud.distribution.constant;

/**
 * @author gaozijie
 * @date 2023-06-02
 */
public enum IncomeStateEnum {
    /**
     * 已失效
     */
    INVALID(-1, "已失效"),
    /**
     * 未支付
     */
    UN_PAY(0, "未支付"),
    /**
     * 未结算
     */
    UN_SETTLED(1, "未结算"),
    /**
     * 已结算
     */
    SETTLED(2, "已结算");


    private final int value;
    private final String desc;

    public Integer value() {
        return value;
    }
    public String desc() {
        return desc;
    }

    IncomeStateEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public static IncomeStateEnum instance(Integer value) {
        IncomeStateEnum[] enums = values();
        for (IncomeStateEnum typeEnum : enums) {
            if (typeEnum.value().equals(value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
