package cn.newfeifan.mall.framework.common.enums;

import cn.hutool.core.util.ObjUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CategoryEnum {
    /**
     * 商城
     */
    MALL(1, "邀请新用户注册"),

    /**
     * 店铺
     */
    SHOP(2, "店铺"),

    /**
     * 商品
     */
    PRODUCT(3, "商品");

    private final int category;
    private final String name;


    public static boolean isMall(Integer category) {
        return ObjUtil.equal(MALL.category, category);
    }

    public static boolean isShop(Integer category) {
        return ObjUtil.equal(SHOP.category, category);
    }

    public static boolean isProduct(Integer category) {
        return ObjUtil.equal(PRODUCT.category, category);
    }
}