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 CuseromtTypeEnum {
    KING("KING","金蝶经销商"),
    JIAXIAN("JIAXIAN","嘉贤二级经销商"),
    GONGCHENG("GONGCHENG","商用经销商")
;

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


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

}
