feat: aminecontent calibration reforge

This commit is contained in:
2026-06-17 10:31:40 +03:00
parent 0849a0ae67
commit 0676c0be75
23 changed files with 588 additions and 916 deletions
@@ -0,0 +1,195 @@
// <auto-generated />
using System;
using GSS2.Core.Analysis.AmineContent.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GSS2.Core.Analysis.AmineContent.Database.Migrations
{
[DbContext(typeof(Context))]
[Migration("20260615113305_Migration0")]
partial class Migration0
{
/// <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.BrandRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<string>("BrandName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Марка пробы");
b.Property<string>("MixtureName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Название кондиционирующей смеси");
b.Property<double>("MixtureNormalRate")
.HasColumnType("REAL")
.HasComment("Норма расхода кондиционирующей смеси (кг/т | гр/кг)");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("BrandRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.FeatureRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<int>("SampleRecordId")
.HasColumnType("INTEGER")
.HasComment("Проба");
b.Property<int>("SeparatorRecordId")
.HasColumnType("INTEGER")
.HasComment("Сепаратор");
b.PrimitiveCollection<string>("Values")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Значения вектора");
b.HasKey("Id");
b.ToTable("FeatureRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.ImageRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<string>("Base64")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Значения вектора");
b.HasKey("Id");
b.ToTable("ImageRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.SampleRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<int>("BrandId")
.HasColumnType("INTEGER")
.HasComment("Марка");
b.PrimitiveCollection<string>("FeatureIds")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Признаки");
b.Property<int>("ImageId")
.HasColumnType("INTEGER")
.HasComment("Изображение");
b.Property<double>("MeasuredContent")
.HasColumnType("REAL")
.HasComment("Измеренное количество кондиционирующей смеси (кг/т | гр/кг)");
b.Property<double>("MixtureActualRate")
.HasColumnType("REAL")
.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("Дата и время отбора пробы (utc)");
b.Property<string>("SamplingPlace")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Место отбора пробы");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("SampleRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.SeparatorRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.PrimitiveCollection<string>("FeatureIds")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Признаки");
b.Property<int>("ImageId")
.HasColumnType("INTEGER")
.HasComment("Изображение");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Тип");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("SeparatorRecords");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,116 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GSS2.Core.Analysis.AmineContent.Database.Migrations
{
/// <inheritdoc />
public partial class Migration0 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BrandRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false, comment: "Идентификатор")
.Annotation("Sqlite:Autoincrement", true),
Uuid = table.Column<string>(type: "TEXT", maxLength: 36, nullable: false, comment: "Уникальный идентификатор"),
BrandName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false, comment: "Марка пробы"),
MixtureName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false, comment: "Название кондиционирующей смеси"),
MixtureNormalRate = table.Column<double>(type: "REAL", nullable: false, comment: "Норма расхода кондиционирующей смеси (кг/т | гр/кг)")
},
constraints: table =>
{
table.PrimaryKey("PK_BrandRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FeatureRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false, comment: "Идентификатор")
.Annotation("Sqlite:Autoincrement", true),
Values = table.Column<string>(type: "TEXT", nullable: false, comment: "Значения вектора"),
SeparatorRecordId = table.Column<int>(type: "INTEGER", nullable: false, comment: "Сепаратор"),
SampleRecordId = table.Column<int>(type: "INTEGER", nullable: false, comment: "Проба")
},
constraints: table =>
{
table.PrimaryKey("PK_FeatureRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ImageRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false, comment: "Идентификатор")
.Annotation("Sqlite:Autoincrement", true),
Base64 = table.Column<string>(type: "TEXT", nullable: false, comment: "Значения вектора")
},
constraints: table =>
{
table.PrimaryKey("PK_ImageRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SampleRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false, comment: "Идентификатор")
.Annotation("Sqlite:Autoincrement", true),
Uuid = table.Column<string>(type: "TEXT", maxLength: 36, nullable: false, comment: "Уникальный идентификатор"),
SampleName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false, comment: "Название пробы"),
SampleComment = table.Column<string>(type: "TEXT", maxLength: 512, nullable: false, comment: "Дополнительная информация о пробе"),
SamplingDateTime = table.Column<DateTime>(type: "TEXT", nullable: false, comment: "Дата и время отбора пробы (utc)"),
BrandId = table.Column<int>(type: "INTEGER", nullable: false, comment: "Марка"),
SamplingPlace = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false, comment: "Место отбора пробы"),
MixtureActualRate = table.Column<double>(type: "REAL", nullable: false, comment: "Фактический расход кондиционирующей смеси (кг/т | гр/кг)"),
MeasuredContent = table.Column<double>(type: "REAL", nullable: false, comment: "Измеренное количество кондиционирующей смеси (кг/т | гр/кг)"),
ImageId = table.Column<int>(type: "INTEGER", nullable: false, comment: "Изображение"),
FeatureIds = table.Column<string>(type: "TEXT", nullable: false, comment: "Признаки")
},
constraints: table =>
{
table.PrimaryKey("PK_SampleRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SeparatorRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false, comment: "Идентификатор")
.Annotation("Sqlite:Autoincrement", true),
Uuid = table.Column<string>(type: "TEXT", maxLength: 36, nullable: false, comment: "Уникальный идентификатор"),
Type = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false, comment: "Тип"),
ImageId = table.Column<int>(type: "INTEGER", nullable: false, comment: "Изображение"),
FeatureIds = table.Column<string>(type: "TEXT", nullable: false, comment: "Признаки")
},
constraints: table =>
{
table.PrimaryKey("PK_SeparatorRecords", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BrandRecords");
migrationBuilder.DropTable(
name: "FeatureRecords");
migrationBuilder.DropTable(
name: "ImageRecords");
migrationBuilder.DropTable(
name: "SampleRecords");
migrationBuilder.DropTable(
name: "SeparatorRecords");
}
}
}
@@ -0,0 +1,192 @@
// <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.Migrations
{
[DbContext(typeof(Context))]
partial class ContextModelSnapshot : 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.BrandRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<string>("BrandName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Марка пробы");
b.Property<string>("MixtureName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Название кондиционирующей смеси");
b.Property<double>("MixtureNormalRate")
.HasColumnType("REAL")
.HasComment("Норма расхода кондиционирующей смеси (кг/т | гр/кг)");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("BrandRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.FeatureRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<int>("SampleRecordId")
.HasColumnType("INTEGER")
.HasComment("Проба");
b.Property<int>("SeparatorRecordId")
.HasColumnType("INTEGER")
.HasComment("Сепаратор");
b.PrimitiveCollection<string>("Values")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Значения вектора");
b.HasKey("Id");
b.ToTable("FeatureRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.ImageRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<string>("Base64")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Значения вектора");
b.HasKey("Id");
b.ToTable("ImageRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.SampleRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.Property<int>("BrandId")
.HasColumnType("INTEGER")
.HasComment("Марка");
b.PrimitiveCollection<string>("FeatureIds")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Признаки");
b.Property<int>("ImageId")
.HasColumnType("INTEGER")
.HasComment("Изображение");
b.Property<double>("MeasuredContent")
.HasColumnType("REAL")
.HasComment("Измеренное количество кондиционирующей смеси (кг/т | гр/кг)");
b.Property<double>("MixtureActualRate")
.HasColumnType("REAL")
.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("Дата и время отбора пробы (utc)");
b.Property<string>("SamplingPlace")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Место отбора пробы");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("SampleRecords");
});
modelBuilder.Entity("GSS2.Core.Analysis.AmineContent.Database.SeparatorRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasComment("Идентификатор");
b.PrimitiveCollection<string>("FeatureIds")
.IsRequired()
.HasColumnType("TEXT")
.HasComment("Признаки");
b.Property<int>("ImageId")
.HasColumnType("INTEGER")
.HasComment("Изображение");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasComment("Тип");
b.Property<string>("Uuid")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasComment("Уникальный идентификатор");
b.HasKey("Id");
b.ToTable("SeparatorRecords");
});
#pragma warning restore 612, 618
}
}
}