package cn.iocoder.yudao.module.iot.controller.admin.device.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 物联设备分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DevicePageReqVO extends PageParam {

    @Schema(description = "设备编号")
    private String deviceCode;

    @Schema(description = "设备名称", example = "赵六")
    private String deviceName;

    @Schema(description = "设备类型", example = "2")
    private String deviceType;

    @Schema(description = "状态", example = "1")
    private String status;

    @Schema(description = "读主题")
    private String readTopic;

    @Schema(description = "写主题")
    private String writeTopic;

    @Schema(description = "网关id", example = "16311")
    private Long gatewayId;

    @Schema(description = "设备品牌id", example = "24731")
    private Long deviceBrandId;

    @Schema(description = "离线间隔")
    private Long offLineDuration;

    @Schema(description = "最后上线时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] lastOnlineTime;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "是否启用")
    private Boolean isEnable;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "关联设备模型",  example = "1")
    private Long deviceModelId;

    @Schema(description = "通讯协议", example = "OPCUA")
    private String protocol;

    @Schema(description = "采集周期", example = "30")
    private Double sampleCycle;

    @Schema(description = "端点url", example = "opc.tcp://127.0.0.1:48401")
    private String url;

    @Schema(description = "用户名", example = "admin")
    private String username;

    @Schema(description = "密码", example = "1234")
    private String password;

    @Schema(description = "id集合导出用")
    private String ids;

    @Schema(description = "mqtt订阅主题")
    private String topic;

}