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 K3CustomerStatusEnum {
    A(true,"启用"),
    B(false,"禁用");

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


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

}
