package com.zy.asrs.entity; 
 | 
  
 | 
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; 
 | 
import com.baomidou.mybatisplus.enums.IdType; 
 | 
import com.baomidou.mybatisplus.annotations.TableField; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
import org.springframework.format.annotation.DateTimeFormat; 
 | 
  
 | 
import io.swagger.annotations.ApiModelProperty; 
 | 
import lombok.Data; 
 | 
import com.baomidou.mybatisplus.annotations.TableName; 
 | 
import java.io.Serializable; 
 | 
  
 | 
@Data 
 | 
@TableName("wcs_device_error") 
 | 
public class DeviceError implements Serializable { 
 | 
  
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    @ApiModelProperty(value= "") 
 | 
    @TableId(value = "id", type = IdType.AUTO) 
 | 
    private Long id; 
 | 
  
 | 
    /** 
 | 
     * 设备 
 | 
     */ 
 | 
    @ApiModelProperty(value= "设备") 
 | 
    private String device; 
 | 
  
 | 
    /** 
 | 
     * 设备ID 
 | 
     */ 
 | 
    @ApiModelProperty(value= "设备ID") 
 | 
    @TableField("device_id") 
 | 
    private Integer deviceId; 
 | 
  
 | 
    /** 
 | 
     * 创建时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "创建时间") 
 | 
    @TableField("create_time") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date createTime; 
 | 
  
 | 
    /** 
 | 
     * 异常信息 
 | 
     */ 
 | 
    @ApiModelProperty(value= "异常信息") 
 | 
    private String msg; 
 | 
  
 | 
    public DeviceError() {} 
 | 
  
 | 
    public DeviceError(String device,Integer deviceId,Date createTime,String msg) { 
 | 
        this.device = device; 
 | 
        this.deviceId = deviceId; 
 | 
        this.createTime = createTime; 
 | 
        this.msg = msg; 
 | 
    } 
 | 
  
 | 
//    DeviceError deviceError = new DeviceError( 
 | 
//            null,    // 设备 
 | 
//            null,    // 设备ID 
 | 
//            null,    // 创建时间 
 | 
//            null    // 异常信息 
 | 
//    ); 
 | 
  
 | 
    public String getCreateTime$(){ 
 | 
        if (Cools.isEmpty(this.createTime)){ 
 | 
            return ""; 
 | 
        } 
 | 
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |