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;

/**
 * 设备模板属性 读取类型枚举
 *
 * @author ahh
 */
@AllArgsConstructor
@Getter
public enum DeviceTemplateAttrAccessModeEnum implements ArrayValuable<String> {

    READ_ONLY("r"),
    READ_WRITE("rw");

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

    private final String mode;

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

}
