package com.xy.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel("设备-系统信息")
@Accessors(chain = true)
public class DeviceSysinfoDto {

    @Data
    @Accessors(chain = true)
    public static class Up extends Vo {

        @NotNull(message = "deviceId不能为空")
        @ApiModelProperty(value = "设备ID", required = true)
        private Long deviceId;
    }

    @Data
    @Accessors(chain = true)
    public static class SelectList extends Vo {

        @ApiModelProperty("设备ID集合")
        private List<Long> deviceIds;

        @ApiModelProperty("设备SN号集合")
        private List<String> deviceSns;
    }

    @Data
    @Accessors(chain = true)
    public static class DeviceSysInfo {

        @ApiModelProperty("设备SN")
        private String deviceSN;
    }

    @Data
    @Accessors(chain = true)
    public static class Vo {
        @ApiModelProperty("设备ID")
        private Long deviceId;

        @ApiModelProperty("设备SN号")
        private String deviceSn;

        @ApiModelProperty("启动程序版本号")
        private String androidStartAppVersion;

        @ApiModelProperty("安卓系统版本号")
        private String androidVersion;

        @ApiModelProperty("系统root状态")
        private Integer androidRootState;

        @ApiModelProperty("安卓系统型号")
        private String androidModel;

        @ApiModelProperty("系统启动APP")
        private String sysLauncher;

        @ApiModelProperty("系统时区")
        private String sysTimezone;

        @ApiModelProperty("是否自动时间")
        private Integer sysDatetimeauto;

        @ApiModelProperty("是否自动时间")
        private Integer sysTimezhoneauto;

        @ApiModelProperty("上位机版本号")
        private String appUpmVersion;

        @ApiModelProperty("下位机版本号")
        private String appDownmVersion;

        @ApiModelProperty("流量卡号")
        private String simIccid;

        @ApiModelProperty("流量卡运营商")
        private String simIsp;

        @ApiModelProperty("流量卡公司")
        private String simCompany;

        @ApiModelProperty("磁盘空间")
        private Integer diskSpace;

        @ApiModelProperty("内存容量")
        private Integer memerySpace;

        @ApiModelProperty("是否有温控仪")
        private Boolean isHaveTemp;

        @ApiModelProperty("是否可调主灯")
        private Boolean isHaveLightMain;

        @ApiModelProperty("是否可调副灯")
        private Boolean isHaveLightSecond;

        @ApiModelProperty("是否冷冻机")
        private Boolean isHaveFreeze;

        @ApiModelProperty("是否有玻璃加热")
        private Boolean isHaveHeat;

        @ApiModelProperty("设备型号")
        private String deviceModel;

        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        @ApiModelProperty("创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;

        @ApiModelProperty("屏幕类型")
        private Integer screenType;

        /**
         * 是否有支付宝NPAD
         */
        @ApiModelProperty("是否有支付宝NPAD")
        private Boolean isHaveAlipayNpad;
        /**
         * nfc设备sn
         */
        @ApiModelProperty("nfc设备sn")
        private String nfcSn;

    }


}
