using CommunityToolkit.Mvvm.ComponentModel;

namespace ZB.MOM.WW.OtOpcUa.Client.UI.ViewModels;

/// <summary>
///     Represents a single historical value row.
/// </summary>
public class HistoryValueViewModel : ObservableObject
{
    /// <summary>Initializes a new instance of the <see cref="HistoryValueViewModel"/> class.</summary>
    /// <param name="value">The historical value.</param>
    /// <param name="status">The status code or text.</param>
    /// <param name="sourceTimestamp">The source timestamp in string format.</param>
    /// <param name="serverTimestamp">The server timestamp in string format.</param>
    public HistoryValueViewModel(string value, string status, string sourceTimestamp, string serverTimestamp)
    {
        Value = value;
        Status = status;
        SourceTimestamp = sourceTimestamp;
        ServerTimestamp = serverTimestamp;
    }

    /// <summary>Gets the historical value.</summary>
    public string Value { get; }
    /// <summary>Gets the status code or text.</summary>
    public string Status { get; }
    /// <summary>Gets the source timestamp in string format.</summary>
    public string SourceTimestamp { get; }
    /// <summary>Gets the server timestamp in string format.</summary>
    public string ServerTimestamp { get; }
}