package com.bonus.canteen.core.order.common.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@TableName("order_error_log")
public class OrderErrorLog {
   @TableId
   private Long logId;
   private Long relatedId;
   private String traceId;
   private Integer orderErrorType;
   private Integer orderErrorState;
   private String msg;
   private String data;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private LocalDateTime crtime;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private LocalDateTime uptime;

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

   public Long getRelatedId() {
      return this.relatedId;
   }

   public String getTraceId() {
      return this.traceId;
   }

   public Integer getOrderErrorType() {
      return this.orderErrorType;
   }

   public Integer getOrderErrorState() {
      return this.orderErrorState;
   }

   public String getMsg() {
      return this.msg;
   }

   public String getData() {
      return this.data;
   }

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

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

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

   public void setRelatedId(final Long relatedId) {
      this.relatedId = relatedId;
   }

   public void setTraceId(final String traceId) {
      this.traceId = traceId;
   }

   public void setOrderErrorType(final Integer orderErrorType) {
      this.orderErrorType = orderErrorType;
   }

   public void setOrderErrorState(final Integer orderErrorState) {
      this.orderErrorState = orderErrorState;
   }

   public void setMsg(final String msg) {
      this.msg = msg;
   }

   public void setData(final String data) {
      this.data = data;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

}
