package cn.iocoder.yudao.module.pms.controller.admin.iotdevicecategorytemplateattrs.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Schema(description = "管理后台 - 设备扩展属性 json 解析对象")
@Data
@ToString(callSuper = true)
public class IotDeviceProperty {

    private Integer id;
    private Integer deviceCategoryId;
    private Object templateId;
    private String name;
    private String code;
    private String type;
    private Integer requiredFlag;
    private String defaultValue;
    private String unit;
    private String description;
    private Integer status;
    private String remark;
    private Integer sort;
    private SelectOptions selectOptions;
    private Integer version;
    private Long createTime;
    private String value;

    public static class DataSpecs {
        private String dataType;
        private Integer length;
        private Integer max;
        private Integer min;
        private Integer step;
        private Integer precise;
        private Object defaultValue;
        private String unit;
        private String unitName;

        // Getters and Setters
    }

    public static class DataSpecsItem {
        private String dataType;
        private String name;
        private Object value;

        // Getters and Setters
    }

    public static class SelectOptions {
        private String name;
        private Object placeHolder;
        private String code;
        private String type;
        private Integer requiredFlag;
        private Object sort;
        private String identifier;
        private Object defaultValue;
        private Object accessMode;
        private DataSpecs dataSpecs;
        private List<DataSpecsItem> dataSpecsList;

        // Getters and Setters
    }

}