package com.gree.mall.manager.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.gree.mall.manager.enums.base.BaseEnum;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum AdminNoticTypeEnum implements BaseEnum {
    YES("NOTICE","平台公告"),
    WBI("WBI","维保消息费用申请"),
    WBK("WBK","维保费用申请审批"),
    CRE_ORDER("CRE_ORDER","创建工单"),
    SEND_MALL("SEND_MALL","商城订单发货"),
    RP_MALL("RP_MALL","商城订单维权"),
    CR_SALES("CR_SALES","支付订单"),
    ENGIN_PAY_ORDER("ENGIN_PAY_ORDER","工程收款单"),
    CR_ES_SALES("CR_ES_SALES","二手商品订单"),
    ;

    @EnumValue
    @JsonValue
    private final String key;
    private final String remark;


    public static IsEnum findEnumByKey(String key) {
        IsEnum[] values = IsEnum.values();
        for (IsEnum isEnum : values) {
            if (isEnum.getKey().equals(key)) {
                return isEnum;
            }
        }
        return null;
    }

}
