2024-11-15 16:29:15 +05:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
2025-01-22 16:13:56 +05:00
|
|
|
|
using System.Text.Json;
|
2024-12-18 16:00:51 +05:00
|
|
|
|
using DD.Persistence.Database.Model;
|
2024-11-15 16:29:15 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
namespace DD.Persistence.Database.Postgres.Migrations
|
2024-11-15 16:29:15 +05:00
|
|
|
|
{
|
2024-11-26 15:07:18 +05:00
|
|
|
|
[DbContext(typeof(PersistencePostgresContext))]
|
|
|
|
|
partial class PersistencePostgresContextModelSnapshot : ModelSnapshot
|
2024-11-15 16:29:15 +05:00
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
2024-12-26 17:23:50 +05:00
|
|
|
|
.HasAnnotation("ProductVersion", "9.0.0")
|
2024-11-15 16:29:15 +05:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
2025-01-22 16:13:56 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.DataScheme", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("DiscriminatorId")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid")
|
|
|
|
|
.HasComment("Идентификатор схемы данных");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PropNames")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("jsonb")
|
|
|
|
|
.HasComment("Наименования полей в порядке индексации");
|
|
|
|
|
|
|
|
|
|
b.HasKey("DiscriminatorId");
|
|
|
|
|
|
2025-01-22 17:12:18 +05:00
|
|
|
|
b.ToTable("data_scheme");
|
2025-01-22 16:13:56 +05:00
|
|
|
|
});
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.DataSourceSystem", b =>
|
2024-11-28 08:55:50 +05:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("SystemId")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-13 11:00:41 +05:00
|
|
|
|
.HasComment("Id системы - источника данных");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.HasColumnType("text")
|
2024-12-13 11:00:41 +05:00
|
|
|
|
.HasComment("Описание системы - источника данных");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("varchar(256)")
|
2024-12-13 11:00:41 +05:00
|
|
|
|
.HasComment("Наименование системы - источника данных");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
|
|
|
|
b.HasKey("SystemId");
|
|
|
|
|
|
2024-12-26 17:23:50 +05:00
|
|
|
|
b.ToTable("data_source_system");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
});
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.ParameterData", b =>
|
2024-12-04 14:13:25 +05:00
|
|
|
|
{
|
2024-12-12 11:47:52 +05:00
|
|
|
|
b.Property<Guid>("DiscriminatorId")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-04 14:13:25 +05:00
|
|
|
|
.HasComment("Дискриминатор системы");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ParameterId")
|
|
|
|
|
.HasColumnType("integer")
|
|
|
|
|
.HasComment("Id параметра");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTimeOffset>("Timestamp")
|
|
|
|
|
.HasColumnType("timestamp with time zone")
|
|
|
|
|
.HasComment("Временная отметка");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Value")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("varchar(256)")
|
|
|
|
|
.HasComment("Значение параметра в виде строки");
|
|
|
|
|
|
|
|
|
|
b.HasKey("DiscriminatorId", "ParameterId", "Timestamp");
|
|
|
|
|
|
2024-12-26 17:23:50 +05:00
|
|
|
|
b.ToTable("parameter_data");
|
2024-12-04 14:13:25 +05:00
|
|
|
|
});
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.TechMessage", b =>
|
2024-11-26 10:23:48 +05:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("EventId")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid")
|
|
|
|
|
.HasComment("Id события");
|
|
|
|
|
|
2024-11-28 13:13:07 +05:00
|
|
|
|
b.Property<int>("CategoryId")
|
|
|
|
|
.HasColumnType("integer")
|
|
|
|
|
.HasComment("Id Категории важности");
|
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
b.Property<int>("EventState")
|
|
|
|
|
.HasColumnType("integer")
|
|
|
|
|
.HasComment("Статус события");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SystemId")
|
|
|
|
|
.HasColumnType("uuid")
|
|
|
|
|
.HasComment("Id системы, к которой относится сообщение");
|
2024-11-26 10:23:48 +05:00
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
b.Property<string>("Text")
|
2024-11-28 08:55:50 +05:00
|
|
|
|
.IsRequired()
|
2024-11-26 10:23:48 +05:00
|
|
|
|
.HasColumnType("varchar(512)")
|
|
|
|
|
.HasComment("Текст сообщения");
|
|
|
|
|
|
2024-11-28 13:13:07 +05:00
|
|
|
|
b.Property<DateTimeOffset>("Timestamp")
|
|
|
|
|
.HasColumnType("timestamp with time zone")
|
|
|
|
|
.HasComment("Дата возникновения");
|
|
|
|
|
|
2024-11-26 10:23:48 +05:00
|
|
|
|
b.HasKey("EventId");
|
|
|
|
|
|
2024-11-28 08:55:50 +05:00
|
|
|
|
b.HasIndex("SystemId");
|
|
|
|
|
|
2024-12-26 17:23:50 +05:00
|
|
|
|
b.ToTable("tech_message");
|
2024-11-26 10:23:48 +05:00
|
|
|
|
});
|
|
|
|
|
|
2025-01-14 17:56:59 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.TimestampedValues", b =>
|
2024-11-28 08:55:50 +05:00
|
|
|
|
{
|
2025-01-14 17:56:59 +05:00
|
|
|
|
b.Property<Guid>("DiscriminatorId")
|
2024-11-28 08:55:50 +05:00
|
|
|
|
.HasColumnType("uuid")
|
2025-01-14 17:56:59 +05:00
|
|
|
|
.HasComment("Дискриминатор системы");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
|
|
|
|
b.Property<DateTimeOffset>("Timestamp")
|
|
|
|
|
.HasColumnType("timestamp with time zone")
|
2025-01-14 17:56:59 +05:00
|
|
|
|
.HasComment("Временная отметка");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
2025-01-14 17:56:59 +05:00
|
|
|
|
b.Property<string>("Values")
|
2024-11-28 08:55:50 +05:00
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("jsonb")
|
2025-01-14 17:56:59 +05:00
|
|
|
|
.HasComment("Данные");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
2025-01-14 17:56:59 +05:00
|
|
|
|
b.HasKey("DiscriminatorId", "Timestamp");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
2025-01-22 17:12:18 +05:00
|
|
|
|
b.ToTable("timestamped_values");
|
2024-11-28 08:55:50 +05:00
|
|
|
|
});
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Model.ChangeLog", b =>
|
2024-11-25 10:05:23 +05:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Ключ записи");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
|
|
|
|
b.Property<DateTimeOffset>("Creation")
|
|
|
|
|
.HasColumnType("timestamp with time zone")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Дата создания записи");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
2024-11-26 14:19:16 +05:00
|
|
|
|
b.Property<double>("DepthEnd")
|
|
|
|
|
.HasColumnType("double precision")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Глубина забоя на дату окончания интервала");
|
2024-11-26 14:19:16 +05:00
|
|
|
|
|
|
|
|
|
b.Property<double>("DepthStart")
|
|
|
|
|
.HasColumnType("double precision")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Глубина забоя на дату начала интервала");
|
2024-11-26 14:19:16 +05:00
|
|
|
|
|
|
|
|
|
b.Property<Guid>("IdAuthor")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Автор изменения");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
2024-11-26 14:19:16 +05:00
|
|
|
|
b.Property<Guid>("IdDiscriminator")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Дискриминатор таблицы");
|
2024-11-26 14:19:16 +05:00
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("IdEditor")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Редактор");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
2024-11-26 14:19:16 +05:00
|
|
|
|
b.Property<Guid?>("IdNext")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Id заменяющей записи");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
2024-11-26 14:19:16 +05:00
|
|
|
|
b.Property<Guid>("IdSection")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Ключ секции");
|
2024-11-26 14:19:16 +05:00
|
|
|
|
|
2024-11-25 10:05:23 +05:00
|
|
|
|
b.Property<DateTimeOffset?>("Obsolete")
|
|
|
|
|
.HasColumnType("timestamp with time zone")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Дата устаревания (например при удалении)");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
b.Property<string>("Value")
|
2024-11-25 10:05:23 +05:00
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("jsonb")
|
2024-12-12 11:47:52 +05:00
|
|
|
|
.HasComment("Значение");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-12-26 17:23:50 +05:00
|
|
|
|
b.ToTable("change_log");
|
2024-11-25 10:05:23 +05:00
|
|
|
|
});
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Model.Setpoint", b =>
|
2024-11-18 10:26:05 +05:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Key")
|
|
|
|
|
.HasColumnType("uuid")
|
|
|
|
|
.HasComment("Ключ");
|
|
|
|
|
|
2025-01-14 17:56:59 +05:00
|
|
|
|
b.Property<DateTimeOffset>("Timestamp")
|
2024-11-18 10:26:05 +05:00
|
|
|
|
.HasColumnType("timestamp with time zone")
|
2024-11-26 10:23:48 +05:00
|
|
|
|
.HasComment("Дата создания уставки");
|
2024-11-18 10:26:05 +05:00
|
|
|
|
|
2024-12-02 15:14:00 +05:00
|
|
|
|
b.Property<Guid>("IdUser")
|
|
|
|
|
.HasColumnType("uuid")
|
2024-11-18 10:26:05 +05:00
|
|
|
|
.HasComment("Id автора последнего изменения");
|
|
|
|
|
|
2025-01-22 16:13:56 +05:00
|
|
|
|
b.Property<JsonElement>("Value")
|
2024-11-18 10:26:05 +05:00
|
|
|
|
.HasColumnType("jsonb")
|
|
|
|
|
.HasComment("Значение уставки");
|
|
|
|
|
|
2025-01-14 17:56:59 +05:00
|
|
|
|
b.HasKey("Key", "Timestamp");
|
2024-11-18 10:26:05 +05:00
|
|
|
|
|
2024-12-26 17:23:50 +05:00
|
|
|
|
b.ToTable("setpoint");
|
2024-11-18 10:26:05 +05:00
|
|
|
|
});
|
2024-11-28 08:55:50 +05:00
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.TechMessage", b =>
|
2024-11-28 08:55:50 +05:00
|
|
|
|
{
|
2024-12-16 15:38:46 +05:00
|
|
|
|
b.HasOne("DD.Persistence.Database.Entity.DataSourceSystem", "System")
|
2024-11-28 08:55:50 +05:00
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("SystemId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("System");
|
|
|
|
|
});
|
2025-01-16 17:19:27 +05:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DD.Persistence.Database.Entity.TimestampedValues", b =>
|
|
|
|
|
{
|
2025-01-22 16:13:56 +05:00
|
|
|
|
b.HasOne("DD.Persistence.Database.Entity.DataScheme", "DataScheme")
|
2025-01-16 17:19:27 +05:00
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("DiscriminatorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2025-01-22 16:13:56 +05:00
|
|
|
|
b.Navigation("DataScheme");
|
2025-01-16 17:19:27 +05:00
|
|
|
|
});
|
2024-11-15 16:29:15 +05:00
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|