feat: quality property

This commit is contained in:
2026-06-08 09:47:52 +03:00
parent 226d35f5d5
commit 0849a0ae67
7 changed files with 267 additions and 5 deletions
@@ -0,0 +1,131 @@
// <auto-generated />
using System;
using GSS2.Core.Analysis.AmineContent.Database.Results;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GSS2.Core.Analysis.AmineContent.Database.Results.Migrations
{
[DbContext(typeof(ResultsContext))]
[Migration("20260608053836_Results1")]
partial class Results1
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.Results.ResultRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Уникальный идентификатор");
b.Property<string>("Image")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Изображение");
b.Property<string>("MaskImage")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Маска");
b.Property<double>("MaxValue")
.HasColumnType("REAL")
.HasComment("Максимальное значение");
b.Property<double?>("MeanQuality")
.HasColumnType("REAL")
.HasComment("Среднее качество обработки");
b.Property<double>("MeanValue")
.HasColumnType("REAL")
.HasComment("Среднее значение");
b.PrimitiveCollection<string>("MeanValues")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Средние значения");
b.Property<double>("MeanVariance")
.HasColumnType("REAL")
.HasComment("Средняя дисперсия");
b.Property<double>("MinValue")
.HasColumnType("REAL")
.HasComment("Минимальное значение");
b.Property<int>("ParticlesCount")
.HasColumnType("INTEGER")
.HasComment("Количество частиц");
b.PrimitiveCollection<string>("Qualities")
.HasColumnType("TEXT")
.HasComment("Качества обработки");
b.Property<string>("ResultImage")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Изображение результата");
b.Property<string>("SampleBrand")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Марка пробы");
b.Property<string>("SampleComment")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT")
.HasComment("Дополнительная информация о пробе");
b.Property<string>("SampleName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Название пробы");
b.Property<DateTime>("SamplingDateTime")
.HasColumnType("TEXT")
.HasComment("Дата и время отбора пробы");
b.Property<string>("SamplingPlace")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Место отбора пробы");
b.Property<string>("SeparatorType")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Тип сепаратора");
b.Property<double>("VarianceOfMean")
.HasColumnType("REAL")
.HasComment("Дисперсия среднего");
b.PrimitiveCollection<string>("Variances")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Дисперсии");
b.HasKey("Id");
b.ToTable("ResultRecords");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GSS2.Core.Analysis.AmineContent.Database.Results.Migrations
{
/// <inheritdoc />
public partial class Results1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<double>(
name: "MeanQuality",
table: "ResultRecords",
type: "REAL",
nullable: true,
comment: "Среднее качество обработки");
migrationBuilder.AddColumn<string>(
name: "Qualities",
table: "ResultRecords",
type: "TEXT",
nullable: true,
comment: "Качества обработки");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MeanQuality",
table: "ResultRecords");
migrationBuilder.DropColumn(
name: "Qualities",
table: "ResultRecords");
}
}
}
@@ -40,6 +40,10 @@ namespace GSS2.Core.Analysis.AmineContent.Database.Results.Migrations
.HasColumnType("REAL")
.HasComment("Максимальное значение");
b.Property<double?>("MeanQuality")
.HasColumnType("REAL")
.HasComment("Среднее качество обработки");
b.Property<double>("MeanValue")
.HasColumnType("REAL")
.HasComment("Среднее значение");
@@ -61,6 +65,10 @@ namespace GSS2.Core.Analysis.AmineContent.Database.Results.Migrations
.HasColumnType("INTEGER")
.HasComment("Количество частиц");
b.PrimitiveCollection<string>("Qualities")
.HasColumnType("TEXT")
.HasComment("Качества обработки");
b.Property<string>("ResultImage")
.IsRequired()
.HasMaxLength(256)
@@ -46,8 +46,12 @@ public class ResultRecord
public required double MeanVariance { get; set; }
[Comment("Дисперсия среднего")]
public required double VarianceOfMean { get; set; }
[Comment("Среднее качество обработки")]
public required double? MeanQuality { get; set; }
[Comment("Средние значения")]
public required double[] MeanValues { get; set; }
[Comment("Дисперсии")]
public required double[] Variances { get; set; }
[Comment("Качества обработки")]
public required double[]? Qualities { get; set; }
}