2021-04-02 17:28:07 +05:00
using Microsoft.EntityFrameworkCore ;
using System ;
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 ( )
{
DataSaubBases = new HashSet < DataSaubBase > ( ) ;
Messages = new HashSet < Message > ( ) ;
}
[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 ; }
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 ; }
[InverseProperty(nameof(DataSaubBase.Telemetry))]
public virtual ICollection < DataSaubBase > DataSaubBases { get ; set ; }
[InverseProperty(nameof(Message.Telemetry))]
public virtual ICollection < Message > Messages { get ; set ; }
2021-04-23 10:21:25 +05:00
[InverseProperty(nameof(TelemetryUser.Telemetry))]
public virtual ICollection < TelemetryUser > Users { get ; set ; }
[InverseProperty(nameof(Event.Telemetry))]
public virtual ICollection < Event > Events { get ; set ; }
2021-07-19 15:31:50 +05:00
[InverseProperty(nameof(TelemetryAnalysis.Telemetry))]
public virtual ICollection < TelemetryAnalysis > Analysis { get ; set ; }
2021-04-02 17:28:07 +05:00
}
}