DD.WellWorkover.Cloud/AsbCloudDb/Model/Telemetry.cs

47 lines
2.2 KiB
C#
Raw Permalink Normal View History

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_telemetry"), Comment("таблица привязки телеметрии от комплектов к конкретной скважине.")]
[Index(nameof(RemoteUid), Name = "t_telemetry_remote_uid_index")]
2021-04-23 10:21:25 +05:00
public partial class Telemetry : IId
{
[Key]
[Column("id")]
public int Id { get; set; }
2021-04-23 10:21:25 +05:00
[Column("remote_uid"), Comment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв.")]
2023-02-20 15:06:26 +05:00
public string RemoteUid { get; set; } = null!;
2021-04-07 18:01:56 +05:00
[Column("info", TypeName = "jsonb"), Comment("Информация с панели о скважине")]
2023-02-20 15:06:26 +05:00
public TelemetryInfo Info { get; set; } = new();
2022-04-11 18:00:34 +05:00
[Column("timezone", TypeName = "jsonb"), Comment("Смещение часового пояса от UTC")]
2023-02-20 15:06:26 +05:00
public SimpleTimezone TimeZone { get; set; } = null!;
2021-04-07 18:01:56 +05:00
[InverseProperty(nameof(Model.Well.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual Well? Well { get; set; }
[InverseProperty(nameof(TelemetryDataSaub.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual ICollection<TelemetryDataSaub> DataSaub { get; set; } = null!;
[InverseProperty(nameof(TelemetryDataSpin.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual ICollection<TelemetryDataSpin> DataSpin { get; set; } = null!;
[InverseProperty(nameof(TelemetryDataWellWorkover.Telemetry))]
public virtual ICollection<TelemetryDataWellWorkover> DataWellWorkover { get; set; } = null!;
2021-08-10 15:53:11 +05:00
[InverseProperty(nameof(TelemetryMessage.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual ICollection<TelemetryMessage> Messages { get; set; } = null!;
2021-04-23 10:21:25 +05:00
[InverseProperty(nameof(TelemetryUser.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual ICollection<TelemetryUser> Users { get; set; } = null!;
2021-04-23 10:21:25 +05:00
2021-08-10 15:53:11 +05:00
[InverseProperty(nameof(TelemetryEvent.Telemetry))]
2023-02-20 15:06:26 +05:00
public virtual ICollection<TelemetryEvent> Events { get; set; } = null!;
}
}