feat(api): RobotHistoryController - сохранение истории работы робота

This commit is contained in:
Mikhail Trubnikov
2023-10-06 13:58:10 +10:00
parent d334e46780
commit 9060db1fe4
14 changed files with 2228 additions and 187 deletions

View File

@@ -188,8 +188,7 @@ namespace PARR.DAL.Context
new { Level = (int)RobotHistoryLevelEnum.Start, Name = RobotHistoryLevelEnum.Start.ToString(), Description = "Робот начал работу " },
new { Level = (int)RobotHistoryLevelEnum.Inforamtion, Name = RobotHistoryLevelEnum.Inforamtion.ToString(), Description = "Информация" },
new { Level = (int)RobotHistoryLevelEnum.Error, Name = RobotHistoryLevelEnum.Error.ToString(), Description = "Ошибка" },
new { Level = (int)RobotHistoryLevelEnum.Complete, Name = RobotHistoryLevelEnum.Complete.ToString(), Description = "Успешно завершил работу" },
new { Level = (int)RobotHistoryLevelEnum.Breake, Name = RobotHistoryLevelEnum.Breake.ToString(), Description = "Завершил работу с ошибкой (не отработал до конца)" }
new { Level = (int)RobotHistoryLevelEnum.Complete, Name = RobotHistoryLevelEnum.Complete.ToString(), Description = "Успешно завершил работу" }
);
});

View File

@@ -23,11 +23,6 @@
/// <summary>
/// Успешно завершил работу
/// </summary>
Complete = 15,
/// <summary>
/// Завершил работу с ошибкой (не отработал до конца)
/// </summary>
Breake = 20
Complete = 15
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class TblRobotHistoryLevelRmBreake : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "RobotHistoryLevels",
keyColumn: "Level",
keyValue: 20);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "RobotHistoryLevels",
columns: new[] { "Level", "Description", "Name" },
values: new object[] { 20, "Завершил работу с ошибкой (не отработал до конца)", "Breake" });
}
}
}

View File

@@ -896,12 +896,6 @@ namespace PARR.DAL.Migrations
Level = 15,
Description = "Успешно завершил работу",
Name = "Complete"
},
new
{
Level = 20,
Description = "Завершил работу с ошибкой (не отработал до конца)",
Name = "Breake"
});
});