
package com.tmerclub.cloud.api.order.constant;

/**
 * 留存类型 1访问留存  2成交留存
 * @author cl
 * @date 2021-05-31 11:01:18
 */
public enum RetainedType {

    /**
     * 访问留存
     */
    VISIT_RETAINED(1),

    /**
     * 成交留存
     */
    TRADE_RETAINED(2);

    private final Integer num;

    public Integer value() {
        return num;
    }

    RetainedType(Integer num) {
        this.num = num;
    }

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