package com.jpsoft.shinestar.modules.base.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
  描述:base_device_info的实体类
 */
@Data
@ApiModel(value = "base_device_info的实体类")
public class DeviceInfo {
	/**
	 *ID
	 */
	@ApiModelProperty(value = "ID")
	private String id;
	/**
	 *表头
	 */
	@ApiModelProperty(value = "表头")
	private String header;
	/**
	 *设备编号
	 */
	@ApiModelProperty(value = "设备编号")
	private String deviceNo;
	/**
	 *设备别名
	 */
	@ApiModelProperty(value = "设备别名")
	private String aliasName;
	/**
	 *单元楼栋
	 */
	@ApiModelProperty(value = "单元楼栋")
	private String address;
	/**
	 *运行状态（是否在线）
	 */
	@ApiModelProperty(value = "运行状态（是否在线）")
	private Boolean isOnline;
	/**
	 *运行状态（是否在线）
	 */
	private String isOnlineN;

    /**
     *公司ID
     */
    @ApiModelProperty(value = "公司ID")
    private String companyId;

	/**
	 *公司名称
	 */
	@ApiModelProperty(value = "公司名称")
	private String companyName;

	/**
	 *开锁密码
	 */
        @ApiModelProperty(value = "开锁密码")
	private String unlockPassword;
	/**
	 *二维码地址
	 */
        @ApiModelProperty(value = "二维码地址")
	private String codeAddress;
	/**
	 *ip地址
	 */
        @ApiModelProperty(value = "ip地址")
	private String ipAddress;
	/**
	 *端口
	 */
        @ApiModelProperty(value = "端口")
	private String port;
	/**
	 *类型
	 */
	@ApiModelProperty(value = "类型")
	private String type;

	/**
	 *类型
	 */
	@ApiModelProperty(value = "类型")
	private String typeN;
	/**
	 *是否开启自动更新
	 */
	@ApiModelProperty(value = "是否开启自动更新")
	private Boolean isAutoUpdate;

	@ApiModelProperty(value = "是否开启自动更新")
	private String isAutoUpdateN;
	/**
	 *是否删除
	 */
        @ApiModelProperty(value = "是否删除")
	private Boolean delFlag;
	/**
	 *创建人
	 */
        @ApiModelProperty(value = "创建人")
	private String createBy;
	/**
	 *创建时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	@ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**
	 *更新人
	 */
        @ApiModelProperty(value = "更新人")
	private String updateBy;
	/**
	 *更新时间
	 */
    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	    @ApiModelProperty(value = "更新时间")
	private Date updateTime;


	@ApiModelProperty(value = "是否绑定人员(只做查询作用，不写入数据库)")
	private Boolean isBindPerson;

	@ApiModelProperty(value = "默认人脸库id")
	private String defaultFaceLibraryId;


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	@ApiModelProperty(value = "心跳更新时间")
	private Date heartbeatUpdateTime;

	@ApiModelProperty(value = "异常原因")
	private String abnormalReason;

	public String getIsOnlineN() {
		if(isOnline!=null) {
			if (isOnline) {
				isOnlineN = "在线";
			} else {
				isOnlineN = "离线";
			}
		}
		return isOnlineN;
	}

	public String getIsAutoUpdateN() {
		if(isAutoUpdate!=null) {
			if (isAutoUpdate) {
				isAutoUpdateN = "是";
			} else {
				isAutoUpdateN = "否";
			}
		}
		return isAutoUpdateN;
	}

	@ApiModelProperty(value = "异常原因")
	private String isBind;

	@ApiModelProperty(value = "经度")
	private String longtitude;

	@ApiModelProperty(value = "纬度")
	private String latitude;

	@ApiModelProperty(value = "设备场景值（数据库 1：为学校大门）")
	private String deviceAddress;

	@ApiModelProperty(value = "内部编号")
	private String code;

	@ApiModelProperty(value = "立柱颜色")
	private String columnColor;

	@ApiModelProperty(value = "立柱颜色")
	private String columnColorN;

	@ApiModelProperty(value = "立柱高度")
	private String columnHeight;

	@ApiModelProperty(value = "立柱颜色")
	private String columnHeightN;

	@ApiModelProperty(value = "设备类型")
	private String deviceType;

	@ApiModelProperty(value = "设备类型")
	private String deviceTypeN;

	@ApiModelProperty(value = "生产厂家(1-宇视，2-海康)")
	private String manufacturer;

	@ApiModelProperty(value = "生产厂家名称")
	private String manufacturerN;

	@ApiModelProperty(value = "远程开门开始时间")
	private String remoteOpenStartTime;

	@ApiModelProperty(value = "远程开门结束时间")
	private String remoteOpenEndTime;

	@ApiModelProperty(value = "远程开门时间范围")
	private String remoteOpenRangeTime;

	@ApiModelProperty(value = "设备应用场景")
	private String scene;

	private String sceneN;

	@ApiModelProperty(value = "设备应用场景")
	private List<String> sceneList;
}