2023-04-04 21:21:06 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
2023-03-31 11:10:16 +05:00
|
|
|
|
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")]
|
2023-04-07 17:58:46 +05:00
|
|
|
|
public T Value { get; set; }
|
2023-03-31 11:10:16 +05:00
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(IdTelemetry))]
|
|
|
|
|
public virtual Telemetry? Telemetry { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-04 21:21:06 +05:00
|
|
|
|
[Table("t_wits_string"), Comment("таблица данных ГТИ с типом значения string")]
|
2023-03-31 11:10:16 +05:00
|
|
|
|
public class WitsItemString : WitsItemBase<string> { }
|
2023-04-04 21:21:06 +05:00
|
|
|
|
|
|
|
|
|
[Table("t_wits_float"), Comment("таблица данных ГТИ с типом значения ")]
|
2023-03-31 11:10:16 +05:00
|
|
|
|
public class WitsItemFloat : WitsItemBase<float> { }
|
2023-04-04 21:21:06 +05:00
|
|
|
|
|
|
|
|
|
[Table("t_wits_int"), Comment("таблица данных ГТИ с типом значения int16 int32")]
|
2023-03-31 11:10:16 +05:00
|
|
|
|
public class WitsItemInt : WitsItemBase<int> { }
|
|
|
|
|
}
|