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 PickOrderEnum {
    YES(1,"已打单"),

    NO(0,"未打单");

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


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

}
