package com.unis.detectionnum.server.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/*
 *设备信息表
 */
@SuppressWarnings("serial")
@Getter
@Setter
@Table(name = "s_device_info")
public class DeviceInfoDO implements Serializable{

	/**
	 * 设备编号（仓房code+001）kddm
	 */
	@Column(name = "sb_code")
    private String sbCode;

	/**
	 * 库点代码（统一社会信用代码+001 三位序号））kddm
	 */
	@Column(name = "kddm")
	private String kddm;
	/**
	 * 设备名称
	 */
	@Column(name = "sb_name")
    private String sbName;

	/**
	 * 所属仓房编号
	 */
	@Column(name = "cfbh")
    private String cfbh;

	/**
	 * 所属仓房名称
	 */
	@Column(name = "cfmc")
    private String cfmc;

	/**
	 * 设备ip地址
	 */
	@Column(name = "sb_ipdz")
    private String sbIpdz;
    
	/**
	 * 设备子网掩码
	 */
	@Column(name = "sb_zwym")
    private String sbZwym;
    
	/**
	 * 设备网关
	 */
	@Column(name = "sb_wgdz")
    private String sbWgdz;

	/**
	 * 设备端口号
	 */
	@Column(name = "sb_dkh")
    private String sbDkh;

	/**
	 * 设备协议版本
	 */
	@Column(name = "sb_xybb")
    private String sbXybb;

	/**
	 * 设备类型(0:探头   1:摄像头)
	 */
	@Column(name = "sb_lx")
    private Integer sbLx;

	/**
	 * 设备状态（0，正常。1，错误）
	 */
	@Column(name = "sb_zt")
    private Integer sbZt;

	/**
	 * 粮食告警阈值设置（外网暂时无法获取公司参数配置，暂时在设备设置）
	 */
	@Column(name = "sb_alarm_num")
    private Double sbAlarmNum;

	/**
	 * 创建时间
	 */
    @DateTimeFormat(pattern = "yyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@Column(name = "create_date")
    private Date createDate;

    /**
	 * 备注
	 */
	@Column(name = "remark")
    private String remark;

//	@Column(name = "granary_density")
//	private Double granaryDensity;

}