package com.gree.mall.miniapp.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import com.gree.mall.miniapp.enums.base.BaseEnum;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public enum IsEnum implements BaseEnum,IEnum<Boolean> {
    Y("true","是"),
    N("false","否"),
    ;

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


    @Override
    public Boolean getValue() {
        return Boolean.parseBoolean(key);
    }
}