feat: migrations update

Added tool for migrations
Updated AmineContentCalibration db
Create AmineContentResults db
This commit is contained in:
2025-12-15 15:29:52 +03:00
parent 567122f2e4
commit 6a2b4a5970
11 changed files with 589 additions and 5 deletions
@@ -0,0 +1,164 @@
// <auto-generated />
using System;
using GSS2.Core.Analysis.AmineContent.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GSS2.Core.Analysis.AmineContent.Database
{
[DbContext(typeof(AmineContentResultsContext))]
partial class AmineContentResultsContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+ImageData", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Уникальный идентификатор");
b.Property<string>("ImagePath")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Путь к файлу изображения");
b.Property<string>("ImageType")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Тип изображения (sample - проба или separator - сепаратор)");
b.Property<double>("Uv254Intensity")
.HasColumnType("REAL")
.HasComment("Интенсивность УФ излучения 254 нм (0..1)");
b.Property<double>("Uv365Intensity")
.HasColumnType("REAL")
.HasComment("Интенсивность УФ излучения 365 нм (0..1)");
b.Property<double>("VisibleIntensity")
.HasColumnType("REAL")
.HasComment("Интенсивность видимого света (0..1)");
b.HasKey("Id");
b.ToTable("Images");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+Record", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Уникальный идентификатор");
b.Property<double>("AirHumidity")
.HasColumnType("REAL")
.HasComment("Относительная влажность воздуха (%)");
b.Property<double>("AirTemperature")
.HasColumnType("REAL")
.HasComment("Температура воздуха (℃)");
b.Property<string>("SampleBrand")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Марка пробы");
b.Property<string>("SampleComment")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Дополнительная информация о пробе");
b.Property<double>("SampleMass")
.HasColumnType("REAL")
.HasComment("Масса пробы (кг)");
b.Property<string>("SampleName")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Название пробы");
b.Property<DateTime>("SamplingDateTime")
.HasColumnType("TEXT")
.HasComment("Дата и время отбора пробы");
b.Property<string>("SamplingPlace")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Место отбора пробы");
b.HasKey("Id");
b.ToTable("Records");
});
modelBuilder.Entity("ImageDataRecord", b =>
{
b.Property<int>("SampleImagesId")
.HasColumnType("INTEGER");
b.Property<int>("SampleRecordsId")
.HasColumnType("INTEGER");
b.HasKey("SampleImagesId", "SampleRecordsId");
b.HasIndex("SampleRecordsId");
b.ToTable("SampleImages", (string)null);
});
modelBuilder.Entity("ImageDataRecord1", b =>
{
b.Property<int>("SeparatorImagesId")
.HasColumnType("INTEGER");
b.Property<int>("SeparatorRecordsId")
.HasColumnType("INTEGER");
b.HasKey("SeparatorImagesId", "SeparatorRecordsId");
b.HasIndex("SeparatorRecordsId");
b.ToTable("SeparatorImages", (string)null);
});
modelBuilder.Entity("ImageDataRecord", b =>
{
b.HasOne("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+ImageData", null)
.WithMany()
.HasForeignKey("SampleImagesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+Record", null)
.WithMany()
.HasForeignKey("SampleRecordsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("ImageDataRecord1", b =>
{
b.HasOne("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+ImageData", null)
.WithMany()
.HasForeignKey("SeparatorImagesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("GSS2.Core.Analysis.AmineContent.Database.AmineContentResultsContext+Record", null)
.WithMany()
.HasForeignKey("SeparatorRecordsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}