package vassistent.model;

import java.time.LocalDateTime;

/**
 * Immutable timestamped value loaded from the persistence layer.
 */
public class DatabaseEntry {

    private final LocalDateTime timestamp;
    private final double value;


    /**
     * Creates an immutable database entry model.
     *
     * @param timestamp event timestamp
     * @param value stored binary value as numeric type
     */
    public DatabaseEntry(LocalDateTime timestamp, double value) {
        this.timestamp = timestamp;
        this.value = value;
    }

    /**
     * Returns the event timestamp.
     *
     * @return timestamp of this entry
     */
    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    /**
     * Returns the stored value.
     *
     * @return numeric event value
     */
    public double getValue() {
        return value;
    }
}
