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

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

@Getter
@AllArgsConstructor
public enum CooperationTypeEnum {
    COOPERATED(0, "合作"),
    NON_COOPERATED(1, "非合作");

    private final Integer type;
    private final String name;

    public static CooperationTypeEnum valueOf(Integer type) {
        return Arrays.stream(values())
                .filter(item -> item.getType().equals(type))
                .findFirst().orElse(null);
    }
}
