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

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

@Getter
@AllArgsConstructor
public enum MatchStatusEnum {
    UNMATCHED(0, "未匹配"),
    MATCHED(1, "已匹配"),
    UNMATCHABLE(2, "无法匹配");

    private final Integer status;
    private final String name;

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