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 K3ReceiptBillTypeEnum {
    A(1,"收款单"),
    B(2,"退款单"),
    C(3,"付款单")
    ;

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


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

}
