package com.tofly.pojo.plan;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "tf_ywpn_fault_w", resultMap = "faultMap")
@ApiModel
public class Fault extends Model<Gpscalculate> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "厂站类型")
    private Long category;

    @ApiModelProperty(value = "厂站类型转义")
    @TableField(exist = false)
    private String categoryName;

    @ApiModelProperty(value = "故障类型")
    private String faultType;
    @TableField(exist = false)
    private String faultTypeName;

    @ApiModelProperty(value = "污水厂id")
    private Long belongStationId;

    @ApiModelProperty(value = "污水厂名称")
    @TableField(exist = false)
    private String belongStationName;

    @ApiModelProperty(value = "泵站id")
    private Long belongPumpId;

    @ApiModelProperty(value = "泵站名称")
    @TableField(exist = false)
    private String belongPumpName;

    @ApiModelProperty(value = "发生日期字符串(yyyy-mm-dd)")
    private String occurrenceDate;

    @ApiModelProperty(value = "发生时间字符串(hh-mm)")
    private String occurrenceTime;

    @ApiModelProperty(value = "故障时长保留2位小数")
    private String failureDuration;

    @ApiModelProperty(value = "结束日期字符串(yyyy-mm-dd)")
    private String overDate;

    @ApiModelProperty(value = "结束时间字符串(hh-mm)")
    private String overTime;

    @ApiModelProperty(value = "设备id")
    private Long deviceId;

    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String deviceName;

    @ApiModelProperty(value = "故障部位")
    private String faultPart;

    @ApiModelProperty(value = "故障情况")
    private String faultCondition;

    @ApiModelProperty(value = "故障原因")
    private String faultCause;

    @ApiModelProperty(value = "处理情况")
    private String disposeCondition;

    @ApiModelProperty(value = "处理人员")
    private Long disposeUserId;

    @ApiModelProperty(value = "处理人员名称")
    @TableField(exist = false)
    private String disposeUserName;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @TableField(exist = false)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "note")
    private String note;

    @ApiModelProperty(value = "文件id,多个以,分隔")
    private String fileIds;

    @ApiModelProperty(value = "文件路径列表")
    @TableField(exist = false)
    List<String> filePathList;

    @ApiModelProperty(value = "查询开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date startTime;

    @ApiModelProperty(value = "查询结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;

    @ApiModelProperty(value = "模糊查询")
    @TableField(exist = false)
    private String likStr;
}
