package com.bonus.canteen.core.device.manage.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bonus.common.houqin.framework.config.deserializer.DateTimeDeserializer;
import com.bonus.common.houqin.framework.config.serializer.DateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

@TableName("device_state_log")
public class DeviceStateLog {
   @TableId
   @ApiModelProperty("主键id")
   private Long id;
   @ApiModelProperty("设备sn码")
   private String deviceSn;
   @ApiModelProperty("异常id设备上传")
   private String logId;
   @ApiModelProperty("设备异常编码")
   private String code;
   @ApiModelProperty("异常信息说明")
   private String message;
   @ApiModelProperty("异常产生时间")
   private String messageTime;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("创建时间")
   @JsonSerialize(
      using = DateTimeSerializer.YYYY_MM_DD_HH_MM_SS.class
   )
   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   @JsonSerialize(
      using = DateTimeSerializer.YYYY_MM_DD_HH_MM_SS.class
   )
   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   private LocalDateTime uptime;

   public Long getId() {
      return this.id;
   }

   public String getDeviceSn() {
      return this.deviceSn;
   }

   public String getLogId() {
      return this.logId;
   }

   public String getCode() {
      return this.code;
   }

   public String getMessage() {
      return this.message;
   }

   public String getMessageTime() {
      return this.messageTime;
   }

   public Integer getRevision() {
      return this.revision;
   }

   public String getCrby() {
      return this.crby;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

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

   public void setDeviceSn(final String deviceSn) {
      this.deviceSn = deviceSn;
   }

   public void setLogId(final String logId) {
      this.logId = logId;
   }

   public void setCode(final String code) {
      this.code = code;
   }

   public void setMessage(final String message) {
      this.message = message;
   }

   public void setMessageTime(final String messageTime) {
      this.messageTime = messageTime;
   }

   public void setRevision(final Integer revision) {
      this.revision = revision;
   }

   public void setCrby(final String crby) {
      this.crby = crby;
   }

   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

   public void setUpby(final String upby) {
      this.upby = upby;
   }

   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

}
