fix(dal): tbl robotHistoryLavel fix information

This commit is contained in:
Mikhail Trubnikov
2024-01-30 14:04:03 +10:00
parent 30765f618b
commit 56e8477bf1
6 changed files with 2909 additions and 5 deletions

View File

@@ -9,8 +9,8 @@ namespace PARR.API.Validators
public RobotHistoryRequestValidator()
{
RuleFor(r => r.HistoryLevel)
.Must(t => t == RobotHistoryLevelEnum.Inforamtion || t == RobotHistoryLevelEnum.Error)
.WithMessage($"Допустимые значения: {(int)RobotHistoryLevelEnum.Inforamtion}, {(int)RobotHistoryLevelEnum.Error}");
.Must(t => t == RobotHistoryLevelEnum.Information || t == RobotHistoryLevelEnum.Error)
.WithMessage($"Допустимые значения: {(int)RobotHistoryLevelEnum.Information}, {(int)RobotHistoryLevelEnum.Error}");
RuleFor(r => r.TaskId).NotNull().NotEmpty();
}

View File

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

View File

@@ -13,7 +13,7 @@
/// <summary>
/// Информация
/// </summary>
Inforamtion = 5,
Information = 5,
/// <summary>
/// Ошибка

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblRobotHistoryLavelFixInformation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "RobotHistoryLevels",
keyColumn: "Level",
keyValue: 5,
column: "Name",
value: "Information");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "RobotHistoryLevels",
keyColumn: "Level",
keyValue: 5,
column: "Name",
value: "Inforamtion");
}
}
}

View File

@@ -2019,7 +2019,7 @@ namespace PARR.DAL.Migrations
{
Level = 5,
Description = "Информация",
Name = "Inforamtion"
Name = "Information"
},
new
{