package com.yuchen.saas.integration.feign.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nest.springwrap.core.tool.utils.DateUtil;

import java.util.Date;

/**
 * @description:
 * @author 钱江
 * @date 2022/6/25 下午4:12
 * @version 0.3.0
 */
@Data
public class DeviceInfoVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "设备ID")
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "产品ID")
    private Long productId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "节点类型Key 1 网关设备 2 网关子设备 3 直连设备")
    private String nodeTypeKey;

    @ApiModelProperty("节点类型Value")
    private String nodeType;

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "设备秘钥")
    private String deviceSecret;

    @ApiModelProperty(value = "设备备注名称")
    private String aliasName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("设备状态 4 未激活 5 在线 6 离线")
    private Integer status;

    @ApiModelProperty("设备状态Label")
    private String statusLabel;

    @ApiModelProperty(value = "产品key")
    private String productKey;

    @ApiModelProperty(value = "产品Secret")
    private String productSecret;

    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "激活时间")
    private Date activeTime;

    @ApiModelProperty(value = "ip地址")
    private String ipAddress;

    @ApiModelProperty(value = "设备描述")
    private String description;

    @ApiModelProperty(value = "创建类型 1 预创建 2 自动创建")
    private Integer createType;

    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "GMT+8")
    @ApiModelProperty("最后上报时间")
    private Date lastReportTime;

    @ApiModelProperty("通讯方式")
    private String networkWay;

    @ApiModelProperty(value = "是否通过网关接入 1 是 0 否")
    private Boolean isBridge;

    @ApiModelProperty(value = "是否禁用产品 1 未禁用 0 已禁用")
    private Boolean productDisableStatus;

    @ApiModelProperty(value = "是否允许自动注册 1允许 0 不允许")
    private Boolean autoRegisterAllowed;

    @ApiModelProperty(value = "是否允许动态注册 1允许 0 不允许")
    private Boolean dynamicRegisterAllowed;
}
