package com.iwunu.nbiot.lock.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonInclude;

import lombok.Getter;
import lombok.Setter;

@Entity
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name="iot_sendcmd_data")
public class CmdData implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private	String cmdSeq;//类型+随机数
	private	String cmdType;
	private	String data;
	private	String deviceId;
	private	String reportContext;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private	String reportTime;
	private	String sendContext;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private	String sendTime;
	private	Integer serviceType;
	private	Integer status;//0已下发等待设备上报 1.上报成功 2.上报失败 3.失效
	private	String sendParam;
	private Integer pitNum;
	private String random;
	private String stamptime;
    @Id
    @Column(name = "id",columnDefinition="bigint(18) COMMENT '主键，自动生成'")
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
