feat(dal, aihitSyncer, aihitLoader): добавлена ЗО для РГ. Обновлён список ЗО. Обновлена синхронизация из АИХИТ.
This commit is contained in:
@@ -142,7 +142,10 @@ namespace PARR.DAL.Context
|
||||
new { Code = (int)ResponseAreaEnum.msk, Name = "17-МСК" },
|
||||
new { Code = (int)ResponseAreaEnum.klgd, Name = "10-КЛГ" },
|
||||
new { Code = (int)ResponseAreaEnum.orw, Name = "01-ОКТ" },
|
||||
new { Code = (int)ResponseAreaEnum.gvc, Name = "00-ГВЦ" }
|
||||
new { Code = (int)ResponseAreaEnum.gvc, Name = "00-ГВЦ" },
|
||||
new { Code = (int)ResponseAreaEnum.general, Name = "ОБЩЕЕ" },
|
||||
new { Code = (int)ResponseAreaEnum.vp, Name = "ВП" },
|
||||
new { Code = (int)ResponseAreaEnum.osk, Name = "ОСК" }
|
||||
);
|
||||
});
|
||||
#endregion
|
||||
|
||||
@@ -90,5 +90,20 @@
|
||||
/// ГВЦ
|
||||
/// </summary>
|
||||
gvc = 99,
|
||||
|
||||
/// <summary>
|
||||
/// ОБЩЕЕ
|
||||
/// </summary>
|
||||
general = 100,
|
||||
|
||||
/// <summary>
|
||||
/// ВП
|
||||
/// </summary>
|
||||
vp = 110,
|
||||
|
||||
/// <summary>
|
||||
/// ОСК
|
||||
/// </summary>
|
||||
osk = 111,
|
||||
}
|
||||
}
|
||||
|
||||
2752
PARR.DAL/Migrations/20240618012342_tblWorkGroupsAddRelToResponseArea.Designer.cs
generated
Normal file
2752
PARR.DAL/Migrations/20240618012342_tblWorkGroupsAddRelToResponseArea.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tblWorkGroupsAddRelToResponseArea : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "ResponseAreas",
|
||||
columns: new[] { "Code", "Name" },
|
||||
values: new object[] { 100, "ОБЩЕЕ" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkGroups_ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
column: "ResponseAreaCode");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
column: "ResponseAreaCode",
|
||||
principalTable: "ResponseAreas",
|
||||
principalColumn: "Code");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_WorkGroups_ResponseAreaCode",
|
||||
table: "WorkGroups");
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "ResponseAreas",
|
||||
keyColumn: "Code",
|
||||
keyValue: 100);
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ResponseAreaCode",
|
||||
table: "WorkGroups");
|
||||
}
|
||||
}
|
||||
}
|
||||
2762
PARR.DAL/Migrations/20240618042349_tblResponseAreaAddVP_OSK.Designer.cs
generated
Normal file
2762
PARR.DAL/Migrations/20240618042349_tblResponseAreaAddVP_OSK.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tblResponseAreaAddVP_OSK : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "ResponseAreas",
|
||||
columns: new[] { "Code", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 110, "ВП" },
|
||||
{ 111, "ОСК" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "ResponseAreas",
|
||||
keyColumn: "Code",
|
||||
keyValue: 110);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "ResponseAreas",
|
||||
keyColumn: "Code",
|
||||
keyValue: 111);
|
||||
}
|
||||
}
|
||||
}
|
||||
2764
PARR.DAL/Migrations/20240618042610_tblWorkGroupRespAreaCodeRequired.Designer.cs
generated
Normal file
2764
PARR.DAL/Migrations/20240618042610_tblWorkGroupRespAreaCodeRequired.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tblWorkGroupRespAreaCodeRequired : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
column: "ResponseAreaCode",
|
||||
principalTable: "ResponseAreas",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
column: "ResponseAreaCode",
|
||||
principalTable: "ResponseAreas",
|
||||
principalColumn: "Code");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1666,6 +1666,21 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Code = 99,
|
||||
Name = "00-ГВЦ"
|
||||
},
|
||||
new
|
||||
{
|
||||
Code = 100,
|
||||
Name = "ОБЩЕЕ"
|
||||
},
|
||||
new
|
||||
{
|
||||
Code = 110,
|
||||
Name = "ВП"
|
||||
},
|
||||
new
|
||||
{
|
||||
Code = 111,
|
||||
Name = "ОСК"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2237,8 +2252,13 @@ namespace PARR.DAL.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("ResponseAreaCode")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ResponseAreaCode");
|
||||
|
||||
b.ToTable("WorkGroups");
|
||||
});
|
||||
|
||||
@@ -2573,6 +2593,17 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("Tnk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.ResponseArea", "ResponseArea")
|
||||
.WithMany("WorkGroups")
|
||||
.HasForeignKey("ResponseAreaCode")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ResponseArea");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.AgentHistoryLevel", b =>
|
||||
{
|
||||
b.Navigation("AgentHistories");
|
||||
@@ -2653,6 +2684,8 @@ namespace PARR.DAL.Migrations
|
||||
modelBuilder.Entity("PARR.DAL.Models.ResponseArea", b =>
|
||||
{
|
||||
b.Navigation("Hosts");
|
||||
|
||||
b.Navigation("WorkGroups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Robot", b =>
|
||||
|
||||
@@ -13,5 +13,7 @@ namespace PARR.DAL.Models
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
public ICollection<WorkGroup> WorkGroups { get; set; } = new HashSet<WorkGroup>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,16 @@ namespace PARR.DAL.Models
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int ResponseAreaCode { get; set; }
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
public ICollection<AppInWorkInWorkGroup> AppInWorks { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
[ForeignKey(nameof(ResponseAreaCode))]
|
||||
public ResponseArea? ResponseArea { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user