package com.mosquito.project.dto;

import java.time.OffsetDateTime;
import java.util.Map;
import java.util.HashMap;

public class ErrorResponse {
    private OffsetDateTime timestamp;
    private String status;
    private String error;
    private String message;
    private String path;
    private Map<String, Object> details;
    private String traceId;

    public ErrorResponse() {}

    public ErrorResponse(OffsetDateTime timestamp, String path, String code, String message, Map<String, String> errors) {
        this.timestamp = timestamp;
        this.path = path;
        this.status = code;
        this.message = message;
        if (errors != null) {
            this.details = new HashMap<>(errors);
        }
    }

    public OffsetDateTime getTimestamp() { return timestamp; }
    public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; }
    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }
    public String getError() { return error; }
    public void setError(String error) { this.error = error; }
    public String getMessage() { return message; }
    public void setMessage(String message) { this.message = message; }
    public String getPath() { return path; }
    public void setPath(String path) { this.path = path; }
    public Map<String, Object> getDetails() { return details; }
    public void setDetails(Map<String, Object> details) { this.details = details; }
    public String getTraceId() { return traceId; }
    public void setTraceId(String traceId) { this.traceId = traceId; }
}

