package com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file;

import java.time.OffsetDateTime;
import java.time.temporal.ChronoUnit;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FileErrorInfo {

    private String cause;
    private String queue;
    private String service;
    private OffsetDateTime timestamp;

    public FileErrorInfo(String cause, String queue, String service) {
        this.cause = cause;
        this.queue = queue;
        this.service = service;
        this.timestamp = OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS);
    }
}
