package cn.pluss.platform.other.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * TODO
 * 积分商城任务类型枚举类
 * @author crystal
 * @date 2022/5/25 10:18
 */
@Getter
@AllArgsConstructor
public enum JfShopTaskType {

    ALL("00","all",0,"全部"),
    PAY_FRIENDS("01","payAsFriends",0,"支付即好友"),
    BIND_ORDER_PUSH("02","bindOrderPush",0,"绑定订单推送"),
    USE_HELP_CENTER("03","useHelpCenter",0,"使用帮助中心"),
    USE_PRODUCT_MANUAL("04","useProductManual",0,"使用产品手册"),
    MONTH_COLLECT_3("05","monthCollect3",3,"本月收款3天"),
    MONTH_COLLECT_7("06","monthCollect7",7,"本月收款7天"),
    MONTH_COLLECT_15("07","monthCollect15",15,"本月收款15天");

    private String status;

    private String code;

    private Integer value;

    private String desc;

    public static JfShopTaskType matchStatus(String status) {
        for (JfShopTaskType taskType : JfShopTaskType.values()) {
            if (taskType.getStatus().equalsIgnoreCase(status)) {
                return taskType;
            }
        }
        return null;
    }
}
