package cn.hanghui.outapi.platform.tenant.entity.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @description: 证件类型
 * @ClassName
 */
@AllArgsConstructor
@Getter
public enum ModeEnum {

    PUBLIC("public", "开放"),
    CLOSE("close", "封闭"),
    ELASTICITY("elasticity", "弹性"),
    ;

    public static ModeEnum getEnumByCode(String code){
        if(StrUtil.isBlank(code)){
            return null;
        }
        for (ModeEnum enumObject : values()){
            if(enumObject.code.equals(code)){
                return enumObject;
            }
        }
        return null;
    }
    private String code;
    private String desc;


}
