feat(api, dal): поиск групп работ, работ, теперь по маске. Статистика по шаблонам по StatusType. Добавлены индексы в Template, RobotConfiguration

This commit is contained in:
Mikhail Trubnikov
2026-02-02 09:24:39 +10:00
parent bd4c9508c9
commit c0210656d9
12 changed files with 4280 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblTemplatesAndRobotConfigurationsAddINdexes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_RobotConfigurations_TemplateId_RobotStatusCode",
table: "RobotConfigurations",
columns: new[] { "TemplateId", "RobotStatusCode" });
migrationBuilder.CreateIndex(
name: "IX_RobotConfigurations_TemplateId_TaskStatusCode",
table: "RobotConfigurations",
columns: new[] { "TemplateId", "TaskStatusCode" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_RobotConfigurations_TemplateId_RobotStatusCode",
table: "RobotConfigurations");
migrationBuilder.DropIndex(
name: "IX_RobotConfigurations_TemplateId_TaskStatusCode",
table: "RobotConfigurations");
}
}
}

View File

@@ -2284,6 +2284,10 @@ namespace PARR.DAL.Migrations
b.HasIndex("TemplateId", "RobotCode")
.IsUnique();
b.HasIndex("TemplateId", "RobotStatusCode");
b.HasIndex("TemplateId", "TaskStatusCode");
b.ToTable("RobotConfigurations");
});

View File

@@ -7,6 +7,8 @@ namespace PARR.DAL.Models
{
[Table("RobotConfigurations")]
[Index(nameof(TemplateId), nameof(RobotCode), IsUnique = true)]
[Index(nameof(TemplateId), nameof(TaskStatusCode))]
[Index(nameof(TemplateId), nameof(RobotStatusCode))]
public class RobotConfiguration : IBase
{
[Key]