forked from ddrilling/AsbCloudServer
Rename some entities
This commit is contained in:
parent
26f291806f
commit
ae5954e345
@ -16,8 +16,6 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<Company> Companies { get; set; }
|
||||
public virtual DbSet<DataSaubBase> DataSaubBases { get; set; }
|
||||
public virtual DbSet<Deposit> Deposits { get; set; }
|
||||
public virtual DbSet<Event> Events { get; set; }
|
||||
public virtual DbSet<Message> Messages { get; set; }
|
||||
public virtual DbSet<User> Users { get; set; }
|
||||
public virtual DbSet<UserRole> UserRoles { get; set; }
|
||||
public virtual DbSet<Well> Wells { get; set; }
|
||||
@ -25,8 +23,10 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<File> Files { get; set; }
|
||||
public virtual DbSet<FileCategory> FileCategories { get; set; }
|
||||
public virtual DbSet<Telemetry> Telemetries { get; set; }
|
||||
public virtual DbSet<TelemetryEvent> TelemetryEvents { get; set; }
|
||||
public virtual DbSet<TelemetryMessage> TelemetryMessages { get; set; }
|
||||
public virtual DbSet<TelemetryUser> TelemetryUsers { get; set; }
|
||||
public virtual DbSet<TelemetryOperation> Operations { get; set; }
|
||||
public virtual DbSet<TelemetryOperation> TelemetryOperations { get; set; }
|
||||
public virtual DbSet<TelemetryAnalysis> TelemetryAnalysis { get; set; }
|
||||
public virtual DbSet<WellSection> WellSections { get; set; }
|
||||
public virtual DbSet<WellOperation> WellOperations { get; set; }
|
||||
@ -74,7 +74,7 @@ namespace AsbCloudDb.Model
|
||||
.HasConstraintName("t_data_saub_base_t_telemetry_id_fk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Message>(entity =>
|
||||
modelBuilder.Entity<TelemetryMessage>(entity =>
|
||||
{
|
||||
entity.HasOne(d => d.Telemetry)
|
||||
.WithMany(p => p.Messages)
|
||||
@ -106,9 +106,9 @@ namespace AsbCloudDb.Model
|
||||
.HasConstraintName("t_analysis_t_operation_id_fk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Event>(entity =>
|
||||
modelBuilder.Entity<TelemetryEvent>(entity =>
|
||||
{
|
||||
entity.HasKey(nameof(Event.IdTelemetry), nameof(Event.IdEvent));
|
||||
entity.HasKey(nameof(TelemetryEvent.IdTelemetry), nameof(TelemetryEvent.IdEvent));
|
||||
entity.HasOne(d => d.Telemetry)
|
||||
.WithMany(p => p.Events)
|
||||
.HasForeignKey(d => d.IdTelemetry)
|
||||
|
@ -13,8 +13,8 @@ namespace AsbCloudDb.Model
|
||||
DbSet<Company> Companies { get; set; }
|
||||
DbSet<DataSaubBase> DataSaubBases { get; set; }
|
||||
DbSet<Deposit> Deposits { get; set; }
|
||||
DbSet<Event> Events { get; set; }
|
||||
DbSet<Message> Messages { get; set; }
|
||||
DbSet<TelemetryEvent> TelemetryEvents { get; set; }
|
||||
DbSet<TelemetryMessage> TelemetryMessages { get; set; }
|
||||
DbSet<User> Users { get; set; }
|
||||
DbSet<UserRole> UserRoles { get; set; }
|
||||
DbSet<ReportProperties> ReportProperties { get; set; }
|
||||
@ -22,7 +22,7 @@ namespace AsbCloudDb.Model
|
||||
DbSet<FileCategory> FileCategories { get; set; }
|
||||
DbSet<Telemetry> Telemetries { get; set; }
|
||||
DbSet<TelemetryUser> TelemetryUsers { get; set; }
|
||||
DbSet<TelemetryOperation> Operations { get; set; }
|
||||
DbSet<TelemetryOperation> TelemetryOperations { get; set; }
|
||||
DbSet<TelemetryAnalysis> TelemetryAnalysis { get; set; }
|
||||
DbSet<Well> Wells { get; set; }
|
||||
DbSet<WellSection> WellSections { get; set; }
|
||||
|
@ -15,7 +15,7 @@ namespace AsbCloudDb.Model
|
||||
public Telemetry()
|
||||
{
|
||||
DataSaubBases = new HashSet<DataSaubBase>();
|
||||
Messages = new HashSet<Message>();
|
||||
Messages = new HashSet<TelemetryMessage>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
@ -34,14 +34,14 @@ namespace AsbCloudDb.Model
|
||||
[InverseProperty(nameof(DataSaubBase.Telemetry))]
|
||||
public virtual ICollection<DataSaubBase> DataSaubBases { get; set; }
|
||||
|
||||
[InverseProperty(nameof(Message.Telemetry))]
|
||||
public virtual ICollection<Message> Messages { get; set; }
|
||||
[InverseProperty(nameof(TelemetryMessage.Telemetry))]
|
||||
public virtual ICollection<TelemetryMessage> 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; }
|
||||
[InverseProperty(nameof(TelemetryEvent.Telemetry))]
|
||||
public virtual ICollection<TelemetryEvent> Events { get; set; }
|
||||
|
||||
[InverseProperty(nameof(TelemetryAnalysis.Telemetry))]
|
||||
public virtual ICollection<TelemetryAnalysis> Analysis { get; set; }
|
||||
|
@ -6,8 +6,8 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
[Table("t_event"), Comment("Справочник событий. События формируют сообщения. Разделено по версиям посылок от телеметрии.")]
|
||||
public partial class Event
|
||||
[Table("t_telemetry_event"), Comment("Справочник событий. События формируют сообщения. Разделено по версиям посылок от телеметрии.")]
|
||||
public partial class TelemetryEvent
|
||||
{
|
||||
[Column("id_event")]
|
||||
public int IdEvent { get; set; }
|
||||
@ -26,7 +26,7 @@ namespace AsbCloudDb.Model
|
||||
[Column("message_template")]
|
||||
public string MessageTemplate { get; set; }
|
||||
|
||||
public string MakeMessageText(Message message)
|
||||
public string MakeMessageText(TelemetryMessage message)
|
||||
{
|
||||
var args = new string[] { message.Arg0, message.Arg1, message.Arg2, message.Arg3 };
|
||||
return string.Format(MessageTemplate, args);
|
@ -7,8 +7,8 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
[Table("t_message"), Comment("Сообщения на буровых")]
|
||||
public partial class Message : IId, IIdTelemetryDate
|
||||
[Table("t_telemetry_message"), Comment("Сообщения на буровых")]
|
||||
public partial class TelemetryMessage : IId, IIdTelemetryDate
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
Loading…
Reference in New Issue
Block a user