package com.inspect.insreportdata.domain;

import com.inspect.base.core.annotation.Excel;
import com.inspect.base.core.web.domain.BaseEntity;
import com.inspect.img.domain.InspectionReportImg;
import com.fasterxml.jackson.annotation.JsonFormat;

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

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class InspectionReportData extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private String lineId;
    @Excel(
            name = "编号"
    )
    private Long code;
    @Excel(
            name = "区域"
    )
    private String area;
    @Excel(
            name = "间隔"
    )
    private String timeInterval;
    @Excel(
            name = "设备名称"
    )
    private String eqName;
    @Excel(
            name = "部件"
    )
    private String parts;
    @Excel(
            name = "点位名称"
    )
    private String pointName;
    @Excel(
            name = "数据来源:视频、机器人、无人机、声纹、在线 监测等"
    )
    private String dataSources;
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    @Excel(
            name = "采集时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd"
    )
    private Date acquisitionTime;
    @Excel(
            name = "巡视结果"
    )
    private String inspectionResults;
    @Excel(
            name = "点位状态：正常、异常、待人工确 认三种状态"
    )
    private String pointStatus;
    @Excel(
            name = "巡视点位缩略图+ 高清原图超链接"
    )
    private String inspectionImg;
    private String reportId;
    List<InspectionReportImg> reportImgList;
    private String algName;

    private String taskName;

    private String taskPatrolledId;

    private String taskResultId;

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        InspectionReportData that = (InspectionReportData) object;
        return Objects.equals(lineId, that.lineId) && Objects.equals(code, that.code) && Objects.equals(area, that.area) && Objects.equals(timeInterval, that.timeInterval) && Objects.equals(eqName, that.eqName) && Objects.equals(parts, that.parts) && Objects.equals(pointName, that.pointName) && Objects.equals(dataSources, that.dataSources) && Objects.equals(acquisitionTime, that.acquisitionTime) && Objects.equals(inspectionResults, that.inspectionResults) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(inspectionImg, that.inspectionImg) && Objects.equals(reportId, that.reportId) && Objects.equals(reportImgList, that.reportImgList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(lineId, code, area, timeInterval, eqName, parts, pointName, dataSources, acquisitionTime, inspectionResults, pointStatus, inspectionImg, reportId, reportImgList);
    }

    @Override
    public String toString() {
        return "InspectionReportData{" +
                "lineId='" + lineId + '\'' +
                ", code=" + code +
                ", area='" + area + '\'' +
                ", interval='" + timeInterval + '\'' +
                ", eqName='" + eqName + '\'' +
                ", parts='" + parts + '\'' +
                ", pointName='" + pointName + '\'' +
                ", dataSources='" + dataSources + '\'' +
                ", acquisitionTime=" + acquisitionTime +
                ", inspectionResults='" + inspectionResults + '\'' +
                ", pointStatus='" + pointStatus + '\'' +
                ", inspectionImg='" + inspectionImg + '\'' +
                ", reportId='" + reportId + '\'' +
                ", reportImgList=" + reportImgList +
                ", algName='" + algName + '\'' +
                ", taskName='" + taskName + '\'' +
                ", taskPatrolledId='" + taskPatrolledId + '\'' +
                ", taskResultId='" + taskResultId + '\'' +
                '}';
    }
}
