forked from ddrilling/AsbCloudServer
31 lines
849 B
C#
31 lines
849 B
C#
|
using System;
|
|||
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
|||
|
namespace AsbCloudDb.Model.GTR
|
|||
|
{
|
|||
|
public class WitsItemBase<T> : ITelemetryData
|
|||
|
{
|
|||
|
[Column("id_telemetry")]
|
|||
|
public int IdTelemetry { get; set; }
|
|||
|
|
|||
|
[Column("id_record")]
|
|||
|
public int IdRecord { get; set; }
|
|||
|
|
|||
|
[Column("id_item")]
|
|||
|
public int IdItem { get; set; }
|
|||
|
|
|||
|
[Column("date", TypeName = "timestamp with time zone")]
|
|||
|
public DateTimeOffset DateTime { get; set; }
|
|||
|
|
|||
|
[Column("Value")]
|
|||
|
public T? Value { get; set; }
|
|||
|
|
|||
|
[ForeignKey(nameof(IdTelemetry))]
|
|||
|
public virtual Telemetry? Telemetry { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class WitsItemString : WitsItemBase<string> { }
|
|||
|
public class WitsItemFloat : WitsItemBase<float> { }
|
|||
|
public class WitsItemInt : WitsItemBase<int> { }
|
|||
|
}
|