package cn.iocoder.yudao.module.pms.enums.devicetemplate;

import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * pms 数据定义的数据类型枚举类
 *
 * @author ruiqi
 */
@AllArgsConstructor
@Getter
public enum IotDataSpecsDataTypeEnum implements ArrayValuable<String> {

    DOUBLE("double"),
    TEXT("text"),
    TEXTAREA("textarea"),
    DATE("date");

    public static final String[] ARRAYS = Arrays.stream(values()).map(IotDataSpecsDataTypeEnum::getDataType).toArray(String[]::new);

    private final String dataType;

    @Override
    public String[] array() {
        return ARRAYS;
    }

}
