feat(dal,api): Удалены старые таблицы AppInWorks
This commit is contained in:
@@ -16,14 +16,14 @@ namespace PARR.DAL.Context
|
||||
{
|
||||
public DataContext(DbContextOptions<DataContext> options) : base(options) { }
|
||||
|
||||
public DbSet<Host> Hosts { get; set; }
|
||||
public DbSet<WorkGroup> WorkGroups { get; set; }
|
||||
public DbSet<AppInWorkInWorkGroup> AppInWorkInWorkGroups { get; set; }
|
||||
public DbSet<EkStatus> EkStatuses { get; set; }
|
||||
public DbSet<ResponseArea> ResponseAreas { get; set; }
|
||||
public DbSet<Application> Applications { get; set; }
|
||||
public DbSet<ApplicationType> ApplicationTypes { get; set; }
|
||||
public DbSet<ApplicationInHost> ApplicationsInHosts { get; set; }
|
||||
//public DbSet<Host> Hosts { get; set; }
|
||||
//public DbSet<WorkGroup> WorkGroups { get; set; }
|
||||
//public DbSet<AppInWorkInWorkGroup> AppInWorkInWorkGroups { get; set; }
|
||||
//public DbSet<EkStatus> EkStatuses { get; set; }
|
||||
//public DbSet<ResponseArea> ResponseAreas { get; set; }
|
||||
//public DbSet<Application> Applications { get; set; }
|
||||
//public DbSet<ApplicationType> ApplicationTypes { get; set; }
|
||||
//public DbSet<ApplicationInHost> ApplicationsInHosts { get; set; }
|
||||
|
||||
public DbSet<Template> Templates { get; set; }
|
||||
public DbSet<TemplateHistory> TemplateHistories { get; set; }
|
||||
@@ -35,7 +35,7 @@ namespace PARR.DAL.Context
|
||||
public DbSet<Subprocess> Subprocesses { get; set; }
|
||||
public DbSet<Tnk> Tnks { get; set; }
|
||||
|
||||
public DbSet<ApplicationsInWork> ApplicationsInWorks { get; set; }
|
||||
//public DbSet<ApplicationsInWork> ApplicationsInWorks { get; set; }
|
||||
|
||||
public DbSet<Models.Setting> Setting { get; set; }
|
||||
|
||||
@@ -163,18 +163,18 @@ namespace PARR.DAL.Context
|
||||
#endregion
|
||||
|
||||
#region ApplicationType
|
||||
modelBuilder.Entity<ApplicationType>(f =>
|
||||
{
|
||||
f.HasData(
|
||||
new() { Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.APP.ToString(), Description = "Сервер приложений" },
|
||||
new() { Id = new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.OS.ToString(), Description = "ОС" },
|
||||
new() { Id = new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.DB.ToString(), Description = "СУБД" },
|
||||
new() { Id = new Guid("749f4c34-b883-4f28-90dd-c161dd3c4270"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.CKBS.ToString(), Description = "ЦК БС" },
|
||||
new() { Id = new Guid("0bd96f9b-d36b-4dfb-bd8a-9c356bc6912b"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.IB.ToString(), Description = "ИБ" },
|
||||
new() { Id = new Guid("4466148b-510d-4423-a58f-ce878152ff01"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.SI.ToString(), Description = "Инфраструктура" },
|
||||
new() { Id = new Guid("725a96db-358e-489b-a7c9-a84b06ec15df"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.SM.ToString(), Description = "Мониторинг" }
|
||||
);
|
||||
});
|
||||
//modelBuilder.Entity<ApplicationType>(f =>
|
||||
//{
|
||||
// f.HasData(
|
||||
// new() { Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.APP.ToString(), Description = "Сервер приложений" },
|
||||
// new() { Id = new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.OS.ToString(), Description = "ОС" },
|
||||
// new() { Id = new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.DB.ToString(), Description = "СУБД" },
|
||||
// new() { Id = new Guid("749f4c34-b883-4f28-90dd-c161dd3c4270"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.CKBS.ToString(), Description = "ЦК БС" },
|
||||
// new() { Id = new Guid("0bd96f9b-d36b-4dfb-bd8a-9c356bc6912b"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.IB.ToString(), Description = "ИБ" },
|
||||
// new() { Id = new Guid("4466148b-510d-4423-a58f-ce878152ff01"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.SI.ToString(), Description = "Инфраструктура" },
|
||||
// new() { Id = new Guid("725a96db-358e-489b-a7c9-a84b06ec15df"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.SM.ToString(), Description = "Мониторинг" }
|
||||
// );
|
||||
//});
|
||||
#endregion
|
||||
|
||||
#region TaskStatus
|
||||
@@ -224,47 +224,47 @@ namespace PARR.DAL.Context
|
||||
#endregion
|
||||
|
||||
#region EK
|
||||
modelBuilder.Entity<EkStatus>(f =>
|
||||
{
|
||||
f.HasData(
|
||||
new { Code = (int)EkStatusEnum.New, Name = "1-Новый" },
|
||||
new { Code = (int)EkStatusEnum.Preapre, Name = "2-Подготовка к эксплуатации" },
|
||||
new { Code = (int)EkStatusEnum.Exploitation, Name = "3-В эксплуатации" },
|
||||
new { Code = (int)EkStatusEnum.Repair, Name = "4-В ремонте" },
|
||||
new { Code = (int)EkStatusEnum.Reserve, Name = "5-В резерве" },
|
||||
new { Code = (int)EkStatusEnum.OutOfService, Name = "6-Выведен из эксплуатации" },
|
||||
new { Code = (int)EkStatusEnum.Test, Name = "7-Тестовый" },
|
||||
new { Code = (int)EkStatusEnum.Development, Name = "9-В разработке" }
|
||||
);
|
||||
});
|
||||
//modelBuilder.Entity<EkStatus>(f =>
|
||||
//{
|
||||
// f.HasData(
|
||||
// new { Code = (int)EkStatusEnum.New, Name = "1-Новый" },
|
||||
// new { Code = (int)EkStatusEnum.Preapre, Name = "2-Подготовка к эксплуатации" },
|
||||
// new { Code = (int)EkStatusEnum.Exploitation, Name = "3-В эксплуатации" },
|
||||
// new { Code = (int)EkStatusEnum.Repair, Name = "4-В ремонте" },
|
||||
// new { Code = (int)EkStatusEnum.Reserve, Name = "5-В резерве" },
|
||||
// new { Code = (int)EkStatusEnum.OutOfService, Name = "6-Выведен из эксплуатации" },
|
||||
// new { Code = (int)EkStatusEnum.Test, Name = "7-Тестовый" },
|
||||
// new { Code = (int)EkStatusEnum.Development, Name = "9-В разработке" }
|
||||
// );
|
||||
//});
|
||||
#endregion
|
||||
|
||||
#region ResponseArea
|
||||
modelBuilder.Entity<ResponseArea>(f =>
|
||||
{
|
||||
f.HasData(
|
||||
new { Code = (int)ResponseAreaEnum.dvgd, Name = "96-ДВС" },
|
||||
new { Code = (int)ResponseAreaEnum.zrw, Name = "94-ЗАБ" },
|
||||
new { Code = (int)ResponseAreaEnum.esrr, Name = "92-ВСИБ" },
|
||||
new { Code = (int)ResponseAreaEnum.krw, Name = "88-КРАСН" },
|
||||
new { Code = (int)ResponseAreaEnum.wsr, Name = "83-ЗСИБ" },
|
||||
new { Code = (int)ResponseAreaEnum.surw, Name = "80-ЮУР" },
|
||||
new { Code = (int)ResponseAreaEnum.svrw, Name = "76-СВРД" },
|
||||
new { Code = (int)ResponseAreaEnum.kbsh, Name = "63-КБШ" },
|
||||
new { Code = (int)ResponseAreaEnum.pvrr, Name = "61-ПРИВ" },
|
||||
new { Code = (int)ResponseAreaEnum.serw, Name = "58-ЮВСТ" },
|
||||
new { Code = (int)ResponseAreaEnum.skzd, Name = "51-СКВ" },
|
||||
new { Code = (int)ResponseAreaEnum.nrr, Name = "28-СЕВ" },
|
||||
new { Code = (int)ResponseAreaEnum.grw, Name = "24-ГОР" },
|
||||
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.general, Name = "ОБЩЕЕ" },
|
||||
new { Code = (int)ResponseAreaEnum.vp, Name = "ВП" },
|
||||
new { Code = (int)ResponseAreaEnum.osk, Name = "ОСК" }
|
||||
);
|
||||
});
|
||||
//modelBuilder.Entity<ResponseArea>(f =>
|
||||
//{
|
||||
// f.HasData(
|
||||
// new { Code = (int)ResponseAreaEnum.dvgd, Name = "96-ДВС" },
|
||||
// new { Code = (int)ResponseAreaEnum.zrw, Name = "94-ЗАБ" },
|
||||
// new { Code = (int)ResponseAreaEnum.esrr, Name = "92-ВСИБ" },
|
||||
// new { Code = (int)ResponseAreaEnum.krw, Name = "88-КРАСН" },
|
||||
// new { Code = (int)ResponseAreaEnum.wsr, Name = "83-ЗСИБ" },
|
||||
// new { Code = (int)ResponseAreaEnum.surw, Name = "80-ЮУР" },
|
||||
// new { Code = (int)ResponseAreaEnum.svrw, Name = "76-СВРД" },
|
||||
// new { Code = (int)ResponseAreaEnum.kbsh, Name = "63-КБШ" },
|
||||
// new { Code = (int)ResponseAreaEnum.pvrr, Name = "61-ПРИВ" },
|
||||
// new { Code = (int)ResponseAreaEnum.serw, Name = "58-ЮВСТ" },
|
||||
// new { Code = (int)ResponseAreaEnum.skzd, Name = "51-СКВ" },
|
||||
// new { Code = (int)ResponseAreaEnum.nrr, Name = "28-СЕВ" },
|
||||
// new { Code = (int)ResponseAreaEnum.grw, Name = "24-ГОР" },
|
||||
// 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.general, Name = "ОБЩЕЕ" },
|
||||
// new { Code = (int)ResponseAreaEnum.vp, Name = "ВП" },
|
||||
// new { Code = (int)ResponseAreaEnum.osk, Name = "ОСК" }
|
||||
// );
|
||||
//});
|
||||
#endregion
|
||||
|
||||
#region Robots
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
namespace PARR.DAL.Context
|
||||
{
|
||||
internal static class DataContextSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Хранение ЭК с компонентным составом, РГ, Типы, С/н, ip, отвтетственные (не пишем шаблоны, расписания)
|
||||
/// </summary>
|
||||
public const string Unit = "unit";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Хранение информации о видах работ, критериях выборки подходящих под работы ЭК и т.д.
|
||||
/// </summary>
|
||||
public const string Job = "job";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Расписание регламентных работ
|
||||
/// </summary>
|
||||
public const string Schedule = "schedule";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Управление очередями
|
||||
/// </summary>
|
||||
public const string Task = "task";
|
||||
}
|
||||
}
|
||||
3790
PARR.DAL/Migrations/20260414232025_RemoveOldTables.Designer.cs
generated
Normal file
3790
PARR.DAL/Migrations/20260414232025_RemoveOldTables.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
373
PARR.DAL/Migrations/20260414232025_RemoveOldTables.cs
Normal file
373
PARR.DAL/Migrations/20260414232025_RemoveOldTables.cs
Normal file
@@ -0,0 +1,373 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemoveOldTables : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AppInWorkInWorkGroups");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ApplicationsInHost");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ApplicationsInWorks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hosts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Applications");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EkStatuses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkGroups");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ApplicationTypes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ResponseAreas");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ApplicationTypes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
Description = table.Column<string>(type: "text", nullable: true),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ApplicationTypes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EkStatuses",
|
||||
columns: table => new
|
||||
{
|
||||
Code = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EkStatuses", x => x.Code);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ResponseAreas",
|
||||
columns: table => new
|
||||
{
|
||||
Code = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ResponseAreas", x => x.Code);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Applications",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ApplicationTypeId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Applications", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Applications_ApplicationTypes_ApplicationTypeId",
|
||||
column: x => x.ApplicationTypeId,
|
||||
principalTable: "ApplicationTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WorkGroups",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ResponseAreaCode = table.Column<int>(type: "integer", nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WorkGroups", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_WorkGroups_ResponseAreas_ResponseAreaCode",
|
||||
column: x => x.ResponseAreaCode,
|
||||
principalTable: "ResponseAreas",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ApplicationsInWorks",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ApplicationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
AgentName = table.Column<string>(type: "text", nullable: true),
|
||||
AgentScript = table.Column<string>(type: "text", nullable: true),
|
||||
AgentTimeOutSec = table.Column<int>(type: "integer", nullable: true),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
FullDescription = table.Column<string>(type: "text", nullable: false),
|
||||
IsAgent = table.Column<bool>(type: "boolean", nullable: false),
|
||||
IsAutoDistributionEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
ReferenceDate = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
ShortDescription = table.Column<string>(type: "text", nullable: false),
|
||||
Solution = table.Column<string>(type: "text", nullable: false),
|
||||
TemplateDuration = table.Column<string>(type: "text", nullable: false),
|
||||
WorkId = table.Column<Guid>(type: "uuid", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ApplicationsInWorks", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ApplicationsInWorks_Applications_ApplicationId",
|
||||
column: x => x.ApplicationId,
|
||||
principalTable: "Applications",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Hosts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
EkStatusCode = table.Column<int>(type: "integer", nullable: false),
|
||||
ResponseAreaCode = table.Column<int>(type: "integer", nullable: false),
|
||||
WorkGroupId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
Ek = table.Column<string>(type: "text", nullable: false),
|
||||
IP = table.Column<string>(type: "text", nullable: true),
|
||||
LastLogon = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Hosts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Hosts_EkStatuses_EkStatusCode",
|
||||
column: x => x.EkStatusCode,
|
||||
principalTable: "EkStatuses",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Hosts_ResponseAreas_ResponseAreaCode",
|
||||
column: x => x.ResponseAreaCode,
|
||||
principalTable: "ResponseAreas",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Hosts_WorkGroups_WorkGroupId",
|
||||
column: x => x.WorkGroupId,
|
||||
principalTable: "WorkGroups",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AppInWorkInWorkGroups",
|
||||
columns: table => new
|
||||
{
|
||||
ApplicationsInWorkId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
WorkGroupId = table.Column<Guid>(type: "uuid", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AppInWorkInWorkGroups", x => new { x.ApplicationsInWorkId, x.WorkGroupId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AppInWorkInWorkGroups_ApplicationsInWorks_ApplicationsInWor~",
|
||||
column: x => x.ApplicationsInWorkId,
|
||||
principalTable: "ApplicationsInWorks",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AppInWorkInWorkGroups_WorkGroups_WorkGroupId",
|
||||
column: x => x.WorkGroupId,
|
||||
principalTable: "WorkGroups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ApplicationsInHost",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ApplicationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
HostId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ApplicationsInHost", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ApplicationsInHost_Applications_ApplicationId",
|
||||
column: x => x.ApplicationId,
|
||||
principalTable: "Applications",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ApplicationsInHost_Hosts_HostId",
|
||||
column: x => x.HostId,
|
||||
principalTable: "Hosts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "ApplicationTypes",
|
||||
columns: new[] { "Id", "DateCreated", "DateModified", "Description", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("0bd96f9b-d36b-4dfb-bd8a-9c356bc6912b"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "ИБ", "IB" },
|
||||
{ new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Сервер приложений", "APP" },
|
||||
{ new Guid("4466148b-510d-4423-a58f-ce878152ff01"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Инфраструктура", "SI" },
|
||||
{ new Guid("725a96db-358e-489b-a7c9-a84b06ec15df"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Мониторинг", "SM" },
|
||||
{ new Guid("749f4c34-b883-4f28-90dd-c161dd3c4270"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "ЦК БС", "CKBS" },
|
||||
{ new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "ОС", "OS" },
|
||||
{ new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "СУБД", "DB" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "EkStatuses",
|
||||
columns: new[] { "Code", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "1-Новый" },
|
||||
{ 2, "2-Подготовка к эксплуатации" },
|
||||
{ 3, "3-В эксплуатации" },
|
||||
{ 4, "4-В ремонте" },
|
||||
{ 5, "5-В резерве" },
|
||||
{ 6, "6-Выведен из эксплуатации" },
|
||||
{ 7, "7-Тестовый" },
|
||||
{ 9, "9-В разработке" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "ResponseAreas",
|
||||
columns: new[] { "Code", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "01-ОКТ" },
|
||||
{ 10, "10-КЛГ" },
|
||||
{ 17, "17-МСК" },
|
||||
{ 24, "24-ГОР" },
|
||||
{ 28, "28-СЕВ" },
|
||||
{ 51, "51-СКВ" },
|
||||
{ 58, "58-ЮВСТ" },
|
||||
{ 61, "61-ПРИВ" },
|
||||
{ 63, "63-КБШ" },
|
||||
{ 76, "76-СВРД" },
|
||||
{ 80, "80-ЮУР" },
|
||||
{ 83, "83-ЗСИБ" },
|
||||
{ 88, "88-КРАСН" },
|
||||
{ 92, "92-ВСИБ" },
|
||||
{ 94, "94-ЗАБ" },
|
||||
{ 96, "96-ДВС" },
|
||||
{ 99, "00-ГВЦ" },
|
||||
{ 100, "ОБЩЕЕ" },
|
||||
{ 110, "ВП" },
|
||||
{ 111, "ОСК" }
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AppInWorkInWorkGroups_WorkGroupId",
|
||||
table: "AppInWorkInWorkGroups",
|
||||
column: "WorkGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Applications_ApplicationTypeId",
|
||||
table: "Applications",
|
||||
column: "ApplicationTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Applications_Name_ApplicationTypeId",
|
||||
table: "Applications",
|
||||
columns: new[] { "Name", "ApplicationTypeId" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ApplicationsInHost_ApplicationId",
|
||||
table: "ApplicationsInHost",
|
||||
column: "ApplicationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ApplicationsInHost_HostId",
|
||||
table: "ApplicationsInHost",
|
||||
column: "HostId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ApplicationsInWorks_ApplicationId",
|
||||
table: "ApplicationsInWorks",
|
||||
column: "ApplicationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ApplicationsInWorks_WorkId_ApplicationId",
|
||||
table: "ApplicationsInWorks",
|
||||
columns: new[] { "WorkId", "ApplicationId" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Hosts_Ek",
|
||||
table: "Hosts",
|
||||
column: "Ek",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Hosts_EkStatusCode",
|
||||
table: "Hosts",
|
||||
column: "EkStatusCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Hosts_IP",
|
||||
table: "Hosts",
|
||||
column: "IP");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Hosts_ResponseAreaCode",
|
||||
table: "Hosts",
|
||||
column: "ResponseAreaCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Hosts_WorkGroupId",
|
||||
table: "Hosts",
|
||||
column: "WorkGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkGroups_ResponseAreaCode",
|
||||
table: "WorkGroups",
|
||||
column: "ResponseAreaCode");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("AppInWorkInWorkGroups")]
|
||||
[PrimaryKey(nameof(ApplicationsInWorkId), nameof(WorkGroupId))]
|
||||
public class AppInWorkInWorkGroup
|
||||
{
|
||||
public Guid ApplicationsInWorkId { get; set; }
|
||||
public Guid WorkGroupId { get; set; }
|
||||
|
||||
public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
public WorkGroup? WorkGroup { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Applications")]
|
||||
[Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)]
|
||||
public class Application : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public Guid ApplicationTypeId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationTypeId))]
|
||||
public ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInHost")]
|
||||
public class ApplicationInHost : IBaseEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
public Guid HostId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(HostId))]
|
||||
public Host? Host { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationTypes")]
|
||||
public class ApplicationType : IBaseEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<Application> Applications { get; set; } = new HashSet<Application>();
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInWorks")]
|
||||
[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
|
||||
public class ApplicationsInWork : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid WorkId { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате ЕСПП
|
||||
/// </summary>
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате TimeSpan
|
||||
/// </summary>
|
||||
public TimeSpan? TemplateDurationTimeSpan
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
//ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00"
|
||||
var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":");
|
||||
|
||||
return TimeSpan.Parse(durationWithTimeSpanFormat);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Краткое описание
|
||||
/// </summary>
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
|
||||
private string _fullDescription = string.Empty;
|
||||
public required string FullDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
//В полное описание подставляем префикс, для дальнейшего поиска наряда
|
||||
return $"{_fullDescription}\r\n{PrefixSettings.PrefixWithoutVariable}";
|
||||
}
|
||||
set
|
||||
{
|
||||
//удаляем префикс, если он есть
|
||||
//_fullDescription = value.Replace($"\r\n{PrefixSettings.PrefixWithoutVariable}", string.Empty);
|
||||
_fullDescription = value.Replace($"{PrefixSettings.PrefixWithoutVariable}", string.Empty).TrimEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Решение
|
||||
/// </summary>
|
||||
public required string Solution { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Включить автораспределение
|
||||
/// </summary>
|
||||
public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата начала работ
|
||||
/// </summary>
|
||||
public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Выполняет агент
|
||||
/// </summary>
|
||||
public bool IsAgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
|
||||
/// </summary>
|
||||
public string? AgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Сколько времени ожидать выполнение скрипта агентом (секунд)
|
||||
/// </summary>
|
||||
public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скрипт для автоматического выполнения
|
||||
/// </summary>
|
||||
public string? AgentScript { get; set; }
|
||||
|
||||
//[ForeignKey(nameof(WorkId))]
|
||||
//public Work? Work { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
// public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
//public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
public ICollection<AppInWorkInWorkGroup> WorkGroups { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
//public JobAutoControl? JobAutoControl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Период автоматического распеделения РР
|
||||
/// </summary>
|
||||
[Table("DistributionPeriods", Schema = DataContextSettings.Schedule)]
|
||||
[Table("DistributionPeriods", Schema = DatabaseSchemas.Schedule)]
|
||||
public class DistributionPeriod : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("DistributionPeriodTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("DistributionPeriodTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
public class DistributionPeriodType
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("EkStatuses")]
|
||||
public class EkStatus
|
||||
{
|
||||
[Key]
|
||||
public int Code { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
//public ICollection<JobAutoControlInEkStatus> JobAutoControlInEkStatuses { get; set; } = new HashSet<JobAutoControlInEkStatus>();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: типы повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchType
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -9,7 +10,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Конфигурация типов
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeConfigs", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeConfigs", Schema = DatabaseSchemas.Schedule)]
|
||||
[Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)]
|
||||
public class EsppSchTypeConfig : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Повторять задачу
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeSchedules", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeSchedules", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeSchedule
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения типов повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeValues", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeValues", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeValue : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения заданий для ApplicationsInWorks
|
||||
/// </summary>
|
||||
[Table("EsppSchValues", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchValues", Schema = DatabaseSchemas.Schedule)]
|
||||
//[Index(nameof(ApplicationsInWorkId), nameof(TypeValueId), nameof(TypeConfigId), IsUnique = true)]
|
||||
//[PrimaryKey(nameof(ApplicationsInWorkId), nameof(TypeValueId), nameof(TypeConfigId))]
|
||||
[PrimaryKey(nameof(JobGroupId), nameof(TypeValueId), nameof(TypeConfigId))]
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Hosts")]
|
||||
[Index(nameof(IP))]
|
||||
[Index(nameof(Ek), IsUnique = true)]
|
||||
public class Host : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Ek { get; set; }
|
||||
|
||||
public int EkStatusCode { get; set; }
|
||||
|
||||
public string? IP { get; set; }
|
||||
|
||||
//public string? RegionalEK { get; set; }
|
||||
//public string? LinkEK { get; set; }
|
||||
|
||||
//TODO: удалить поле Status, вместо него использовать EkStatusCode
|
||||
//public string? StatusStr { get; set; }
|
||||
|
||||
//public string? WorkGroup { get; set; }
|
||||
|
||||
public Guid? WorkGroupId { get; set; }
|
||||
|
||||
//TODO: удалить поле ResponseAreaStr
|
||||
//public string? ResponseAreaStr { get; set; }
|
||||
|
||||
public int ResponseAreaCode { get; set; }
|
||||
|
||||
public DateTimeOffset? LastLogon { get; set; }
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
//public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
|
||||
[ForeignKey(nameof(EkStatusCode))]
|
||||
public EkStatus? EkStatus { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ResponseAreaCode))]
|
||||
public ResponseArea? ResponseArea { get; set; }
|
||||
|
||||
[ForeignKey(nameof(WorkGroupId))]
|
||||
public WorkGroup? WorkGroup { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("Jobs", Schema = DataContextSettings.Job)]
|
||||
[Table("Jobs", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица видов работ")]
|
||||
public class Job : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("AutoControls", Schema = DataContextSettings.Job)]
|
||||
[Table("AutoControls", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица управления автоконтролем для работ")]
|
||||
public class JobAutoControl
|
||||
{
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("FieldFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("FieldFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания критериев выборки аттрибутов ЭК")]
|
||||
public class JobFieldFilter : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Schedule;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -9,7 +10,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("Groups", Schema = DataContextSettings.Job)]
|
||||
[Table("Groups", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания групп работ, для реализации зонтиков")]
|
||||
public class JobGroup : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Job
|
||||
/// <summary>
|
||||
/// Настройки автораспределения для JobGroup
|
||||
/// </summary>
|
||||
[Table("GroupDistributionConfigs", Schema = DataContextSettings.Job)]
|
||||
[Table("GroupDistributionConfigs", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Настройки автораспределения для группы работ")]
|
||||
public class JobGroupDistributionConfig
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -7,7 +8,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("GroupTypes", Schema = DataContextSettings.Job)]
|
||||
[Table("GroupTypes", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица типов групп работ")]
|
||||
public class JobGroupType : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("RelationshipFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("RelationshipFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица фильтров связей ЭК")]
|
||||
[PrimaryKey(nameof(UnitFilterId), nameof(FieldId))]
|
||||
public class JobRelationshipFilter //: IBase
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("UnitFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("UnitFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП")]
|
||||
public class JobUnitFilter : IBaseEntity
|
||||
{
|
||||
|
||||
17
PARR.DAL/Models/Removed/AppInWorkInWorkGroup.cs
Normal file
17
PARR.DAL/Models/Removed/AppInWorkInWorkGroup.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("AppInWorkInWorkGroups")]
|
||||
//[PrimaryKey(nameof(ApplicationsInWorkId), nameof(WorkGroupId))]
|
||||
//public class AppInWorkInWorkGroup
|
||||
//{
|
||||
// public Guid ApplicationsInWorkId { get; set; }
|
||||
// public Guid WorkGroupId { get; set; }
|
||||
|
||||
// public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
// public WorkGroup? WorkGroup { get; set; }
|
||||
|
||||
//}
|
||||
}
|
||||
31
PARR.DAL/Models/Removed/Application.cs
Normal file
31
PARR.DAL/Models/Removed/Application.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("Applications")]
|
||||
//[Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)]
|
||||
//public class Application : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public required string Name { get; set; }
|
||||
|
||||
// public Guid ApplicationTypeId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationTypeId))]
|
||||
// public ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
// public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
// public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
//}
|
||||
}
|
||||
23
PARR.DAL/Models/Removed/ApplicationInHost.cs
Normal file
23
PARR.DAL/Models/Removed/ApplicationInHost.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationsInHost")]
|
||||
//public class ApplicationInHost : IBaseEntity
|
||||
//{
|
||||
// public Guid Id { get; set; }
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public Guid ApplicationId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationId))]
|
||||
// public Application? Application { get; set; }
|
||||
|
||||
// public Guid HostId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(HostId))]
|
||||
// public Host? Host { get; set; }
|
||||
//}
|
||||
}
|
||||
18
PARR.DAL/Models/Removed/ApplicationType.cs
Normal file
18
PARR.DAL/Models/Removed/ApplicationType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationTypes")]
|
||||
//public class ApplicationType : IBaseEntity
|
||||
//{
|
||||
// public Guid Id { get; set; }
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
// public required string Name { get; set; }
|
||||
// public string? Description { get; set; }
|
||||
|
||||
|
||||
// public ICollection<Application> Applications { get; set; } = new HashSet<Application>();
|
||||
//}
|
||||
}
|
||||
122
PARR.DAL/Models/Removed/ApplicationsInWork.cs
Normal file
122
PARR.DAL/Models/Removed/ApplicationsInWork.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationsInWorks")]
|
||||
//[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
|
||||
//public class ApplicationsInWork : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public Guid WorkId { get; set; }
|
||||
|
||||
// public Guid ApplicationId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// TemplateDuration в формате ЕСПП
|
||||
// /// </summary>
|
||||
// public required string TemplateDuration { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// TemplateDuration в формате TimeSpan
|
||||
// /// </summary>
|
||||
// public TimeSpan? TemplateDurationTimeSpan
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// //ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00"
|
||||
// var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":");
|
||||
|
||||
// return TimeSpan.Parse(durationWithTimeSpanFormat);
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Краткое описание
|
||||
// /// </summary>
|
||||
// public required string ShortDescription { get; set; }
|
||||
|
||||
|
||||
// private string _fullDescription = string.Empty;
|
||||
// public required string FullDescription
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// //В полное описание подставляем префикс, для дальнейшего поиска наряда
|
||||
// return $"{_fullDescription}\r\n{PrefixSettings.PrefixWithoutVariable}";
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// //удаляем префикс, если он есть
|
||||
// //_fullDescription = value.Replace($"\r\n{PrefixSettings.PrefixWithoutVariable}", string.Empty);
|
||||
// _fullDescription = value.Replace($"{PrefixSettings.PrefixWithoutVariable}", string.Empty).TrimEnd();
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Решение
|
||||
// /// </summary>
|
||||
// public required string Solution { get; set; }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Включить автораспределение
|
||||
// /// </summary>
|
||||
// public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Дата начала работ
|
||||
// /// </summary>
|
||||
// public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Выполняет агент
|
||||
// /// </summary>
|
||||
// public bool IsAgent { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
|
||||
// /// </summary>
|
||||
// public string? AgentName { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Сколько времени ожидать выполнение скрипта агентом (секунд)
|
||||
// /// </summary>
|
||||
// public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Скрипт для автоматического выполнения
|
||||
// /// </summary>
|
||||
// public string? AgentScript { get; set; }
|
||||
|
||||
// //[ForeignKey(nameof(WorkId))]
|
||||
// //public Work? Work { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationId))]
|
||||
// public Application? Application { get; set; }
|
||||
|
||||
// // public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
// //public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
// public ICollection<AppInWorkInWorkGroup> WorkGroups { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
// //public JobAutoControl? JobAutoControl { get; set; }
|
||||
//}
|
||||
}
|
||||
19
PARR.DAL/Models/Removed/EkStatus.cs
Normal file
19
PARR.DAL/Models/Removed/EkStatus.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("EkStatuses")]
|
||||
//public class EkStatus
|
||||
//{
|
||||
// [Key]
|
||||
// public int Code { get; set; }
|
||||
|
||||
// [Required]
|
||||
// public string Name { get; set; } = string.Empty;
|
||||
|
||||
// public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
// //public ICollection<JobAutoControlInEkStatus> JobAutoControlInEkStatuses { get; set; } = new HashSet<JobAutoControlInEkStatus>();
|
||||
//}
|
||||
}
|
||||
58
PARR.DAL/Models/Removed/Host.cs
Normal file
58
PARR.DAL/Models/Removed/Host.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("Hosts")]
|
||||
//[Index(nameof(IP))]
|
||||
//[Index(nameof(Ek), IsUnique = true)]
|
||||
//public class Host : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public required string Ek { get; set; }
|
||||
|
||||
// public int EkStatusCode { get; set; }
|
||||
|
||||
// public string? IP { get; set; }
|
||||
|
||||
// //public string? RegionalEK { get; set; }
|
||||
// //public string? LinkEK { get; set; }
|
||||
|
||||
// //TODO: удалить поле Status, вместо него использовать EkStatusCode
|
||||
// //public string? StatusStr { get; set; }
|
||||
|
||||
// //public string? WorkGroup { get; set; }
|
||||
|
||||
// public Guid? WorkGroupId { get; set; }
|
||||
|
||||
// //TODO: удалить поле ResponseAreaStr
|
||||
// //public string? ResponseAreaStr { get; set; }
|
||||
|
||||
// public int ResponseAreaCode { get; set; }
|
||||
|
||||
// public DateTimeOffset? LastLogon { get; set; }
|
||||
|
||||
|
||||
// public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
// //public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
|
||||
// [ForeignKey(nameof(EkStatusCode))]
|
||||
// public EkStatus? EkStatus { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ResponseAreaCode))]
|
||||
// public ResponseArea? ResponseArea { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(WorkGroupId))]
|
||||
// public WorkGroup? WorkGroup { get; set; }
|
||||
//}
|
||||
}
|
||||
19
PARR.DAL/Models/Removed/ResponseArea.cs
Normal file
19
PARR.DAL/Models/Removed/ResponseArea.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ResponseAreas")]
|
||||
//public class ResponseArea
|
||||
//{
|
||||
// [Key]
|
||||
// public int Code { get; set; }
|
||||
|
||||
// [Required]
|
||||
// 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>();
|
||||
//}
|
||||
}
|
||||
29
PARR.DAL/Models/Removed/WorkGroup.cs
Normal file
29
PARR.DAL/Models/Removed/WorkGroup.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("WorkGroups")]
|
||||
//public class WorkGroup : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// [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; }
|
||||
//}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ResponseAreas")]
|
||||
public class ResponseArea
|
||||
{
|
||||
[Key]
|
||||
public int Code { get; set; }
|
||||
|
||||
[Required]
|
||||
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>();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
[Table("ExcludeTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ExcludeTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы - Тип исключения")]
|
||||
public class ScheduleExcludeType : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы, исключение - Календарь
|
||||
/// </summary>
|
||||
[Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ExcludeTypeCalendars", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы, исключение - Календарь")]
|
||||
public class ScheduleExcludeTypeCalendar : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы
|
||||
/// </summary>
|
||||
[Table("ResponseAreaTimeOffsets", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ResponseAreaTimeOffsets", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы")]
|
||||
public class ScheduleResponseAreaTimeOffset
|
||||
{
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("Units", Schema = DataContextSettings.Unit)]
|
||||
[Table("Units", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица с ЭК")]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
public class Unit : IBaseEntity
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Справочник полей ЭК (компонентный состав, ответствтвенные, любые поля)
|
||||
/// </summary>
|
||||
[Table("Fields", Schema = DataContextSettings.Unit)]
|
||||
[Table("Fields", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Справочник полей ЭК")]
|
||||
[Index(nameof(AihitName))]
|
||||
[Index(nameof(EsppName))]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("FieldInFieldValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("FieldInFieldValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Значения полей ЭК")]
|
||||
[PrimaryKey(nameof(FieldId), nameof(FieldValueId))]
|
||||
public class UnitFieldInUnitFieldValue : IBaseEntityDateCreated
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("FieldValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("FieldValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Значения полей ЭК")]
|
||||
[Index(nameof(Value), IsUnique = true)]
|
||||
public class UnitFieldValue : IBaseEntity
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// Связь Unit in Field
|
||||
/// </summary>
|
||||
///
|
||||
[Table("UnitInFields", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInFields", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Справочник полей ЭК")]
|
||||
[PrimaryKey(nameof(UnitId), nameof(FieldId))]
|
||||
public class UnitInField
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Связи иерархии между ЭК
|
||||
/// </summary>
|
||||
[Table("UnitInUnits", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInUnits", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица связей иерархии между ЭК")]
|
||||
[PrimaryKey(nameof(ParentUnitId), nameof(ChildUnitId))]
|
||||
public class UnitInUnit
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
|
||||
[Table("UnitInValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица связи ЭК с полями и со значениями")]
|
||||
[PrimaryKey(nameof(UnitId), nameof(FieldId), nameof(ValueId))]
|
||||
[Index(nameof(FieldId), nameof(ValueId))]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Список ЭК КИИ, которые учавствуют в групповых работах. Создавалась как временная
|
||||
/// </summary>
|
||||
[Table("KiiUnits", Schema = DataContextSettings.Unit)]
|
||||
[Table("KiiUnits", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица - Список ЭК КИИ, которые учавствуют в групповых работах. Создавалась как временная")]
|
||||
public class UnitKiiUnit
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("RegionalEkPtkGroups", Schema = DataContextSettings.Unit)]
|
||||
[Table("RegionalEkPtkGroups", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица - региональные группы ПТК")]
|
||||
public class UnitRegionalEkPtkGroup
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("UnitsInTemplates", Schema = DataContextSettings.Job)]
|
||||
[Table("UnitsInTemplates", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица связи ЭК в шаблонах")]
|
||||
public class UnitsInTemplate
|
||||
{
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("WeekendDays", Schema = DataContextSettings.Schedule)]
|
||||
[Table("WeekendDays", Schema = DatabaseSchemas.Schedule)]
|
||||
[Index(nameof(Date), IsUnique = true)]
|
||||
public class WeekendDay : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("WorkGroups")]
|
||||
public class WorkGroup : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ using PARR.DAL.DomainServices.UnitFilterService.Models;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.NextRunServices.Subservices;
|
||||
using PARR.DAL.Repositories.TaskRepositories;
|
||||
using PARR.DAL.Services.Implementation;
|
||||
using PARR.DAL.Services.Implementations;
|
||||
using PARR.DAL.Services.Implementations.Job;
|
||||
using PARR.DAL.Services.Implementations.Schedule;
|
||||
@@ -84,13 +83,13 @@ namespace PARR.DAL
|
||||
|
||||
|
||||
// Entity services
|
||||
services.AddTransient<IHostService, HostService>();
|
||||
services.AddTransient<IWorkGroupService, WorkGroupService>();
|
||||
services.AddTransient<IApplicationService, ApplicationService>();
|
||||
services.AddTransient<IApplicationTypeService, ApplicationTypeService>();
|
||||
services.AddTransient<IApplicationInHostService, ApplicationInHostService>();
|
||||
services.AddTransient<IApplicationsInWorkService, ApplicationsInWorkService>();
|
||||
services.AddTransient<IApplicationService, ApplicationService>();
|
||||
//services.AddTransient<IHostService, HostService>();
|
||||
//services.AddTransient<IWorkGroupService, WorkGroupService>();
|
||||
//services.AddTransient<IApplicationService, ApplicationService>();
|
||||
//services.AddTransient<IApplicationTypeService, ApplicationTypeService>();
|
||||
//services.AddTransient<IApplicationInHostService, ApplicationInHostService>();
|
||||
//services.AddTransient<IApplicationsInWorkService, ApplicationsInWorkService>();
|
||||
//services.AddTransient<IApplicationService, ApplicationService>();
|
||||
services.AddTransient<IProcessService, ProcessService>();
|
||||
services.AddTransient<ISubprocessService, SubprocessService>();
|
||||
services.AddTransient<ITnkService, TnkService>();
|
||||
@@ -108,12 +107,12 @@ namespace PARR.DAL
|
||||
services.AddTransient<IUserService, UserService>();
|
||||
services.AddTransient<IRoleService, RoleService>();
|
||||
services.AddTransient<ITaskStatusService, TaskStatusService>();
|
||||
services.AddTransient<IEkStatusService, EkStatusService>();
|
||||
//services.AddTransient<IEkStatusService, EkStatusService>();
|
||||
services.AddTransient<IEsppSchTypeScheduleService, EsppSchTypeScheduleService>();
|
||||
services.AddTransient<IWeekendDayService, WeekendDayService>();
|
||||
services.AddTransient<IDistributionPeriodService, DistributionPeriodService>();
|
||||
services.AddTransient<IEsppSchTypeValueService, EsppSchTypeValueService>();
|
||||
services.AddTransient<IResponseAreaService, ResponseAreaService>();
|
||||
//services.AddTransient<IResponseAreaService, ResponseAreaService>();
|
||||
services.AddTransient<ITemplateHistoryService, TemplateHistoryService>();
|
||||
services.AddTransient<IParrComponentService, ParrComponentService>();
|
||||
services.AddTransient<ITemplateStatusTypeService, TemplateStatusTypeService>();
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationInHostService : BaseRepository<ApplicationInHost>, IApplicationInHostService
|
||||
{
|
||||
public ApplicationInHostService(DataContext dataContext, ILogger<ApplicationInHostService> logger) : base(logger, dataContext) { }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationService : BaseRepository<Application>, IApplicationService
|
||||
{
|
||||
public ApplicationService(DataContext dataContext, ILogger<ApplicationService> logger) : base(logger, dataContext) { }
|
||||
|
||||
public async Task<Application?> GetByNameAsync(string appName, Guid typeId)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(t => t.Name.ToLower() == appName.Trim().ToLower() && t.ApplicationTypeId == typeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementation
|
||||
{
|
||||
internal class ApplicationTypeService : BaseRepository<ApplicationType>, IApplicationTypeService
|
||||
{
|
||||
public ApplicationTypeService(DataContext dataContext, ILogger<ApplicationTypeService> logger) : base(logger, dataContext) { }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationsInWorkService : BaseRepository<ApplicationsInWork>, IApplicationsInWorkService
|
||||
{
|
||||
public ApplicationsInWorkService(DataContext dataContext, ILogger<ApplicationsInWorkService> logger) : base(logger, dataContext) { }
|
||||
|
||||
public async Task<ApplicationsInWork?> GetAsync(Guid applicationId, Guid workId)
|
||||
{
|
||||
return await base.Get().FirstOrDefaultAsync(t => t.ApplicationId == applicationId && t.WorkId == workId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class EkStatusService : IEkStatusService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public EkStatusService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
public IQueryable<EkStatus> Get()
|
||||
{
|
||||
return dataContext.EkStatuses;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class HostService : BaseRepository<Host>, IHostService
|
||||
{
|
||||
public HostService(DataContext dataContext, ILogger<HostService> logger) : base(logger, dataContext) { }
|
||||
|
||||
|
||||
public async Task<Host?> GetHostWithAppsByIpAsync(string ip)
|
||||
{
|
||||
return await GetHostWithIncludeApps()
|
||||
.AsSplitQuery()
|
||||
.FirstOrDefaultAsync(h => h.IP == ip);
|
||||
}
|
||||
|
||||
|
||||
public async Task<Host?> GetHostWithAppsByEkAsync(string ek)
|
||||
{
|
||||
return await GetHostWithIncludeApps()
|
||||
.AsSplitQuery()
|
||||
.FirstOrDefaultAsync(h => h.Ek.ToLower() == ek.ToLower());
|
||||
}
|
||||
|
||||
|
||||
private IQueryable<Host> GetHostWithIncludeApps()
|
||||
{
|
||||
return EntitySet
|
||||
.Include(t => t.ApplicationsInHosts)
|
||||
.ThenInclude(a => a.Application)
|
||||
.ThenInclude(t => t!.ApplicationType)
|
||||
.Include(t => t.WorkGroup);
|
||||
}
|
||||
|
||||
|
||||
public async Task<Host?> GetByIpAsync(string ip)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(t => t.IP == ip);
|
||||
}
|
||||
|
||||
|
||||
public async Task<Host?> GetByEkAsync(string ek)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(t => t.Ek.ToLower() == ek.ToLower());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ResponseAreaService : IResponseAreaService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public ResponseAreaService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
public IQueryable<ResponseArea> Get()
|
||||
{
|
||||
return dataContext.ResponseAreas;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class WorkGroupService : BaseRepository<WorkGroup>, IWorkGroupService
|
||||
{
|
||||
public WorkGroupService(DataContext dataContext, ILogger<WorkGroupService> logger) : base(logger, dataContext) { }
|
||||
|
||||
public async Task<WorkGroup?> GetByNameAsync(string name)
|
||||
{
|
||||
return await Get().FirstOrDefaultAsync(t => t.Name == name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IApplicationInHostService : IBaseService<ApplicationInHost>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IApplicationService : IBaseService<Application>
|
||||
{
|
||||
Task<Application?> GetByNameAsync(string appName, Guid typeId);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IApplicationTypeService : IBaseService<ApplicationType>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IApplicationsInWorkService : IBaseService<ApplicationsInWork>
|
||||
{
|
||||
Task<ApplicationsInWork?> GetAsync(Guid applicationId, Guid workId);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IEkStatusService
|
||||
{
|
||||
IQueryable<EkStatus> Get();
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IHostService : IBaseService<Host>
|
||||
{
|
||||
Task<Host?> GetHostWithAppsByIpAsync(string ip);
|
||||
|
||||
Task<Host?> GetByIpAsync(string ip);
|
||||
Task<Host?> GetHostWithAppsByEkAsync(string ek);
|
||||
Task<Host?> GetByEkAsync(string ek);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IResponseAreaService
|
||||
{
|
||||
IQueryable<ResponseArea> Get();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IWorkGroupService : IBaseService<WorkGroup>
|
||||
{
|
||||
Task<WorkGroup?> GetByNameAsync(string name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user