
package com.tmerclub.cloud.flow.constant;


/**
 * 页面操作
 *
 * @author yxf
 */
public enum FlowVisitEnum {
    /**
     * 访问页面
     */
    VISIT(1),
    /** 加购 */
    SHOP_CAT(2),
    /** 收藏 */
    COLLECT(3),
    /** 提交订单 */
    CONFIRM_ORDER(4),
    /** 支付成功 */
    PAY_SUCCESS(5);
    private final Integer id;

    public final Integer value() {
        return id;
    }

    FlowVisitEnum(Integer id) {
        this.id = id;
    }

    public static FlowVisitEnum instance (String value) {
        FlowVisitEnum[] enums = values();
        for (FlowVisitEnum statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }

    public static FlowVisitEnum[] allEnum () {
        FlowVisitEnum[] enums = values();
        return enums;
    }


    public static Boolean isVisitOrShare (Integer id){
        if (id.equals(VISIT.value())){
            return true;
        }
        return false;
    }
}
