package cz.senslog.connector.model.logger;

import cz.senslog.connector.model.api.AbstractModel;

import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;

public class LoggerModel extends AbstractModel {

    private final String message;

    public LoggerModel(String message, OffsetDateTime from, OffsetDateTime to) {
        super(from, to);
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return getMessage() + "\t|\t" + getFrom().format(DateTimeFormatter.ISO_DATE_TIME) + " - " + getTo().format(DateTimeFormatter.ISO_DATE_TIME);
    }
}