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

47 lines
2.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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")]
public partial class Telemetry : IId
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("remote_uid"), Comment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв.")]
public string RemoteUid { get; set; } = null!;
[Column("info", TypeName = "jsonb"), Comment("Информация с панели о скважине")]
public TelemetryInfo Info { get; set; } = new();
[Column("timezone", TypeName = "jsonb"), Comment("Смещение часового пояса от UTC")]
public SimpleTimezone TimeZone { get; set; } = null!;
[InverseProperty(nameof(Model.Well.Telemetry))]
public virtual Well? Well { get; set; }
[InverseProperty(nameof(TelemetryDataSaub.Telemetry))]
public virtual ICollection<TelemetryDataSaub> DataSaub { get; set; } = null!;
[InverseProperty(nameof(TelemetryDataSpin.Telemetry))]
public virtual ICollection<TelemetryDataSpin> DataSpin { get; set; } = null!;
[InverseProperty(nameof(TelemetryDataWellWorkover.Telemetry))]
public virtual ICollection<TelemetryDataWellWorkover> DataWellWorkover { get; set; } = null!;
[InverseProperty(nameof(TelemetryMessage.Telemetry))]
public virtual ICollection<TelemetryMessage> Messages { get; set; } = null!;
[InverseProperty(nameof(TelemetryUser.Telemetry))]
public virtual ICollection<TelemetryUser> Users { get; set; } = null!;
[InverseProperty(nameof(TelemetryEvent.Telemetry))]
public virtual ICollection<TelemetryEvent> Events { get; set; } = null!;
}
}