feat(api): JobAutoControlController - управление автоматическим созданием/деактивацией/активацией РР

This commit is contained in:
Mikhail Trubnikov
2024-09-09 15:48:49 +10:00
parent c74086412b
commit 60c525da54
13 changed files with 3505 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblJobEkMaskAddIndexUnique : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_JobEkMasks_JobAutoControlId",
table: "JobEkMasks");
migrationBuilder.CreateIndex(
name: "IX_JobEkMasks_JobAutoControlId_Name",
table: "JobEkMasks",
columns: new[] { "JobAutoControlId", "Name" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_JobEkMasks_JobAutoControlId_Name",
table: "JobEkMasks");
migrationBuilder.CreateIndex(
name: "IX_JobEkMasks_JobAutoControlId",
table: "JobEkMasks",
column: "JobAutoControlId");
}
}
}

View File

@@ -1619,7 +1619,8 @@ namespace PARR.DAL.Migrations
b.HasKey("Id");
b.HasIndex("JobAutoControlId");
b.HasIndex("JobAutoControlId", "Name")
.IsUnique();
b.ToTable("JobEkMasks");
});

View File

@@ -1,10 +1,12 @@
using PARR.DAL.Models.Base;
using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[Table("JobEkMasks")]
[Index(nameof(JobAutoControlId), nameof(Name), IsUnique = true)]
public class JobEkMask : IBase
{
[Key]