2021-04-02 17:28:07 +05:00
using Microsoft.EntityFrameworkCore ;
using System.Collections.Generic ;
using System.ComponentModel.DataAnnotations ;
using System.ComponentModel.DataAnnotations.Schema ;
#nullable disable
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
2021-04-02 17:28:07 +05:00
{
public Telemetry ( )
{
2021-09-14 17:17:33 +05:00
DataSaub = new HashSet < TelemetryDataSaub > ( ) ;
2021-08-10 15:53:11 +05:00
Messages = new HashSet < TelemetryMessage > ( ) ;
2021-04-02 17:28:07 +05:00
}
[Key]
[Column("id")]
public int Id { get ; set ; }
2021-04-23 10:21:25 +05:00
[Column("remote_uid"), Comment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв.")]
2021-04-02 17:28:07 +05:00
public string RemoteUid { get ; set ; }
2021-04-07 18:01:56 +05:00
[Column("info", TypeName = "jsonb"), Comment("Информация с панели о скважине")]
2021-04-23 10:21:25 +05:00
public TelemetryInfo Info { get ; set ; }
2022-04-11 18:00:34 +05:00
2021-11-16 13:14:31 +05:00
[Column("timezone", TypeName = "jsonb"), Comment("Смещение часового пояса от UTC")]
2022-04-11 18:00:34 +05:00
public SimpleTimezone TimeZone { get ; set ; }
2021-04-07 18:01:56 +05:00
2021-04-02 17:28:07 +05:00
[InverseProperty(nameof(Model.Well.Telemetry))]
public virtual Well Well { get ; set ; }
2021-09-14 17:17:33 +05:00
[InverseProperty(nameof(TelemetryDataSaub.Telemetry))]
public virtual ICollection < TelemetryDataSaub > DataSaub { get ; set ; }
[InverseProperty(nameof(TelemetryDataSpin.Telemetry))]
public virtual ICollection < TelemetryDataSpin > DataSpin { get ; set ; }
2021-04-02 17:28:07 +05:00
2021-08-10 15:53:11 +05:00
[InverseProperty(nameof(TelemetryMessage.Telemetry))]
public virtual ICollection < TelemetryMessage > Messages { get ; set ; }
2021-04-23 10:21:25 +05:00
[InverseProperty(nameof(TelemetryUser.Telemetry))]
public virtual ICollection < TelemetryUser > Users { get ; set ; }
2021-08-10 15:53:11 +05:00
[InverseProperty(nameof(TelemetryEvent.Telemetry))]
public virtual ICollection < TelemetryEvent > Events { get ; set ; }
2021-04-23 10:21:25 +05:00
2021-04-02 17:28:07 +05:00
}
}