package com.inspect.analysis.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Setter
@Getter
public class WebsocketData {
    private String time;
    private String devId;
    private String partId;
    private String imgPath;
    private String desc;
    public WebsocketData() {}

    public WebsocketData(String devId,  String desc) {
        this.devId = devId;
        this.desc = desc;
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        WebsocketData that = (WebsocketData) object;
        return Objects.equals(time, that.time) && Objects.equals(devId, that.devId) && Objects.equals(partId, that.partId) && Objects.equals(imgPath, that.imgPath) && Objects.equals(desc, that.desc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(time, devId, partId, imgPath, desc);
    }

    @Override
    public String toString() {
        return "WebsocketData{" +
                "time='" + time + '\'' +
                ", devId='" + devId + '\'' +
                ", partId='" + partId + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
