output-service-tsdb/Models/MeasurementObject.cs
Kristóf Torma cca6aff3c0
All checks were successful
continuous-integration/drone/push Build is passing
added k8s config
2020-04-08 15:48:56 +02:00

31 lines
745 B
C#

using System;
using InfluxDB.Client.Core;
namespace OutputServiceTSDB.Models
{
[Measurement("result")]
public class MeasurementObject
{
[Column("deviceid", IsTag = true)]
public string DeviceID { get; set; }
private double _probability;
[Column("probability")]
public double Probability
{
get => _probability;
set
{
if (value > 1.0 || value < 0.0)
throw new ArgumentOutOfRangeException(
$"{nameof(value)} must be between 0 and 1.");
else
_probability = value;
}
}
[Column(IsTimestamp = true)] public DateTime Time;
}
}