namespace ZB.MOM.WW.LmxProxy.Client.Domain;

/// <summary>Value, Timestamp, and Quality for SCADA data.</summary>
public readonly record struct Vtq(object? Value, DateTime Timestamp, Quality Quality)
{
    public static Vtq Good(object value) => new(value, DateTime.UtcNow, Quality.Good);
    public static Vtq Bad(object? value = null) => new(value, DateTime.UtcNow, Quality.Bad);
    public static Vtq Uncertain(object value) => new(value, DateTime.UtcNow, Quality.Uncertain);

    public override string ToString() =>
        $"{{Value={Value}, Timestamp={Timestamp:yyyy-MM-dd HH:mm:ss.fff}, Quality={Quality}}}";
}
