fix(dal): tbl robotHistoryLavel fix information
This commit is contained in:
@@ -9,8 +9,8 @@ namespace PARR.API.Validators
|
|||||||
public RobotHistoryRequestValidator()
|
public RobotHistoryRequestValidator()
|
||||||
{
|
{
|
||||||
RuleFor(r => r.HistoryLevel)
|
RuleFor(r => r.HistoryLevel)
|
||||||
.Must(t => t == RobotHistoryLevelEnum.Inforamtion || t == RobotHistoryLevelEnum.Error)
|
.Must(t => t == RobotHistoryLevelEnum.Information || t == RobotHistoryLevelEnum.Error)
|
||||||
.WithMessage($"Допустимые значения: {(int)RobotHistoryLevelEnum.Inforamtion}, {(int)RobotHistoryLevelEnum.Error}");
|
.WithMessage($"Допустимые значения: {(int)RobotHistoryLevelEnum.Information}, {(int)RobotHistoryLevelEnum.Error}");
|
||||||
|
|
||||||
RuleFor(r => r.TaskId).NotNull().NotEmpty();
|
RuleFor(r => r.TaskId).NotNull().NotEmpty();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace PARR.DAL.Context
|
|||||||
{
|
{
|
||||||
f.HasData(
|
f.HasData(
|
||||||
new { Level = (int)RobotHistoryLevelEnum.Start, Name = RobotHistoryLevelEnum.Start.ToString(), Description = "Робот начал работу " },
|
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.Error, Name = RobotHistoryLevelEnum.Error.ToString(), Description = "Ошибка" },
|
||||||
new { Level = (int)RobotHistoryLevelEnum.Complete, Name = RobotHistoryLevelEnum.Complete.ToString(), Description = "Успешно завершил работу" }
|
new { Level = (int)RobotHistoryLevelEnum.Complete, Name = RobotHistoryLevelEnum.Complete.ToString(), Description = "Успешно завершил работу" }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Информация
|
/// Информация
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Inforamtion = 5,
|
Information = 5,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ошибка
|
/// Ошибка
|
||||||
|
|||||||
2872
PARR.DAL/Migrations/20240130040230_tblRobotHistoryLavelFixInformation.Designer.cs
generated
Normal file
2872
PARR.DAL/Migrations/20240130040230_tblRobotHistoryLavelFixInformation.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2019,7 +2019,7 @@ namespace PARR.DAL.Migrations
|
|||||||
{
|
{
|
||||||
Level = 5,
|
Level = 5,
|
||||||
Description = "Информация",
|
Description = "Информация",
|
||||||
Name = "Inforamtion"
|
Name = "Information"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user