package org.springblade.modules.business.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 设备故障信息
 */
@Data
@TableName("t_facility_fault")
@ApiModel(value = "FacilityFault对象", description = "设备故障表")
public class FacilityFault {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    protected Long id;

    /**
     * 设备id
     */
    @ApiModelProperty(value = "设备id")
    private String facilityId;

    /**
     * 故障描述
     */
    @ApiModelProperty(value = "故障描述")
    private String faultDesc;

    /**
     * 故障状态
     */
    @ApiModelProperty(value = "故障状态")
    private String faultStatus;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected Date createTime;

}
