Изменение модели данных

Из сущности DetectedOperation удалён атрибут IdUsersAtStart
This commit is contained in:
Степанов Дмитрий 2024-02-20 11:13:35 +03:00
parent df8ddf3122
commit 847846948d
4 changed files with 9481 additions and 9 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class DetectedOperateion_Remove_IdUser : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "id_user",
table: "t_detected_operation");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "id_user",
table: "t_detected_operation",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "Id пользователя по телеметрии на момент начала операции");
}
}
}

View File

@ -532,11 +532,6 @@ namespace AsbCloudDb.Migrations
.HasColumnType("integer")
.HasColumnName("id_telemetry");
b.Property<int>("IdUsersAtStart")
.HasColumnType("integer")
.HasColumnName("id_user")
.HasComment("Id пользователя по телеметрии на момент начала операции");
b.Property<double>("Value")
.HasColumnType("double precision")
.HasColumnName("value")

View File

@ -8,7 +8,7 @@ using System.Text.Json.Serialization;
namespace AsbCloudDb.Model
{
[Table("t_detected_operation"), Comment("автоматически определенные операции по телеметрии")]
public class DetectedOperation
public class DetectedOperation : IId
{
[Key]
[Column("id")]
@ -20,9 +20,6 @@ namespace AsbCloudDb.Model
[Column("id_category"), Comment("Id категории операции")]
public int IdCategory { get; set; }
[Column("id_user"), Comment("Id пользователя по телеметрии на момент начала операции")]
public int IdUsersAtStart { get; set; }
[Column("date_start", TypeName = "timestamp with time zone"), Comment("Дата начала операции")]
public DateTimeOffset DateStart { get; set; }