DD.WellWorkover.Cloud/AsbCloudDb/Model/Telemetry.cs
2021-04-23 10:21:25 +05:00

48 lines
1.8 KiB
C#
Raw 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;
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")]
public partial class Telemetry : IId
{
public Telemetry()
{
DataSaubBases = new HashSet<DataSaubBase>();
Messages = new HashSet<Message>();
}
[Key]
[Column("id")]
public int Id { get; set; }
[Column("remote_uid"), Comment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв.")]
public string RemoteUid { get; set; }
[Column("info", TypeName = "jsonb"), Comment("Информация с панели о скважине")]
public TelemetryInfo Info { get; set; }
[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; }
[InverseProperty(nameof(TelemetryUser.Telemetry))]
public virtual ICollection<TelemetryUser> Users { get; set; }
[InverseProperty(nameof(Event.Telemetry))]
public virtual ICollection<Event> Events { get; set; }
}
}