package com.ningdatech.carapi.sys.entity.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author liuxinxin
 * @date 2022/7/26 上午9:21
 */
@AllArgsConstructor
@Getter
public enum BooleanDisplayEnum {

    /**
     * true
     */
    Y,

    /**
     * false
     */
    N;

    public static Boolean judgeBoolean(String key) {
        return Y.name().equals(key);
    }

    public static BooleanDisplayEnum judgeBoolean(Boolean key) {
        return key ? Y : N;
    }


}
