package com.inspect.exec.domain;

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

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

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class SilenceTaskPointExecRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long pointId;
    @Excel(
            name = "巡视设备名称"
    )
    private String patrolDeviceName;
    @Excel(
            name = "巡视设备编码"
    )
    private String patrolDeviceCode;
    @Excel(
            name = "任务名称"
    )
    private String taskName;
    @Excel(
            name = "任务编码"
    )
    private String taskCode;
    @Excel(
            name = "设备点位名称"
    )
    private String deviceName;
    @Excel(
            name = "设备点位ID"
    )
    private String deviceId;
    private String valueType;
    @Excel(
            name = "值"
    )
    private String value;
    @Excel(
            name = "值带单位"
    )
    private String valueUnit;
    @Excel(
            name = "单位"
    )
    private String unit;
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    @Excel(
            name = "时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd"
    )
    private Date time;
    private String recognitionType;
    private String fileType;
    @Excel(
            name = "文件名称--存在多个文件，路径用逗号分隔，并与文件 类型一一对应"
    )
    private String filePath;
    private String rectangle;
    @Excel(
            name = "巡视任务执行ID"
    )
    private String taskPatrolledId;
    @Excel(
            name = "巡视点位id"
    )
    private Long patrolPointId;

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        SilenceTaskPointExecRecord that = (SilenceTaskPointExecRecord) object;
        return Objects.equals(pointId, that.pointId) && Objects.equals(patrolDeviceName, that.patrolDeviceName) && Objects.equals(patrolDeviceCode, that.patrolDeviceCode) && Objects.equals(taskName, that.taskName) && Objects.equals(taskCode, that.taskCode) && Objects.equals(deviceName, that.deviceName) && Objects.equals(deviceId, that.deviceId) && Objects.equals(valueType, that.valueType) && Objects.equals(value, that.value) && Objects.equals(valueUnit, that.valueUnit) && Objects.equals(unit, that.unit) && Objects.equals(time, that.time) && Objects.equals(recognitionType, that.recognitionType) && Objects.equals(fileType, that.fileType) && Objects.equals(filePath, that.filePath) && Objects.equals(rectangle, that.rectangle) && Objects.equals(taskPatrolledId, that.taskPatrolledId) && Objects.equals(patrolPointId, that.patrolPointId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pointId, patrolDeviceName, patrolDeviceCode, taskName, taskCode, deviceName, deviceId, valueType, value, valueUnit, unit, time, recognitionType, fileType, filePath, rectangle, taskPatrolledId, patrolPointId);
    }

    @Override
    public String toString() {
        return "SilenceTaskPointExecRecord{" +
                "pointId=" + pointId +
                ", patrolDeviceName='" + patrolDeviceName + '\'' +
                ", patrolDeviceCode='" + patrolDeviceCode + '\'' +
                ", taskName='" + taskName + '\'' +
                ", taskCode='" + taskCode + '\'' +
                ", deviceName='" + deviceName + '\'' +
                ", deviceId='" + deviceId + '\'' +
                ", valueType='" + valueType + '\'' +
                ", value='" + value + '\'' +
                ", valueUnit='" + valueUnit + '\'' +
                ", unit='" + unit + '\'' +
                ", time=" + time +
                ", recognitionType='" + recognitionType + '\'' +
                ", fileType='" + fileType + '\'' +
                ", filePath='" + filePath + '\'' +
                ", rectangle='" + rectangle + '\'' +
                ", taskPatrolledId='" + taskPatrolledId + '\'' +
                ", patrolPointId=" + patrolPointId +
                '}';
    }
}
