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

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

@Getter
@AllArgsConstructor
public enum BillSubmitStatusEnum {
    NOT_SUBMITTED(0, "未提交"),
    SUBMITTED(1, "已提交"),
    REJECTED(2, "已驳回");

    private final Integer status;
    private final String name;

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