package com.zfire.mall.manager.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum K3CommonStatusEnum {
    A("A","正常"),
    B("B","禁用");

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


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

}
