package com.gic.haoban.manage.api.enums.content;

public enum InteractRecordEventType {

    MATERIAL(1, "访问素材详情页"),
    PRODUCT(2, "访问分享商品"),
    ORDER(3, "下单购买"),
    ADD_SHOPPING_CART(4, "加购");

    InteractRecordEventType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static InteractRecordEventType getInstance(Integer code) {
        if (code == null) {
            return null;
        }
        for (InteractRecordEventType value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
    private Integer code;
    private String desc;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
