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 PickTypeStatusEnum {
    YES("1","上午"),
    NO("2","下午");

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


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

}
