package com.ruoyi.bst.device.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 开关SET
 * @author wjh
 * 2024/3/22
 */
@AllArgsConstructor
@Getter
public enum DeviceSet {

	POSITIVE("0",  "正"),
	NEGATIVE("1", "反");

    private final String value;
    private final String msg;

    public static DeviceSet parse(String value) {
        for (DeviceSet obj : DeviceSet.values()) {
            if (Objects.equals(obj.getValue(), value)) {
                return obj;
            }
        }
        return null;
    }

}
