package com.qiuguo.iot.third.enums;

import java.util.Objects;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * XXX
 *
 * @author weiyachao
 * @since 2023/9/26 17:30
 */
@Getter
@ToString
@AllArgsConstructor
public enum TuyaCategoryEnum {
    
    DJ("dj", "光源", "switch_led"),
    
    SD("sd", "扫地机器人", "power"),
    
    
    ;
    
    private final String code;
    
    private final String name;
    
    private final String switchColumn;
    
    public static String getColumn(String code) {
        TuyaCategoryEnum[] values = values();
        for (TuyaCategoryEnum value : values) {
            if (Objects.equals(value.code, code)) {
                return value.switchColumn;
            }
        }
        return null;
    }
    
    
}
