package cn.iocoder.yudao.module.energy.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum DeductionStatusEnum {
    NOT_DEDUCTED(0, "未扣款"),
    DEDUCTED(1, "已扣款");

    private final Integer status;
    private final String name;

    public static DeductionStatusEnum valueOf(Integer status) {
        return Arrays.stream(values())
                .filter(item -> item.getStatus().equals(status))
                .findFirst().orElse(null);
    }
}
