Рефакторинг DTO

This commit is contained in:
Степанов Дмитрий 2024-02-20 11:15:05 +03:00
parent 847846948d
commit a3938a2dff
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.DetectedOperation;
@ -72,14 +73,14 @@ public class DetectedOperationDto: IId
[Required]
public WellOperationCategoryDto OperationCategory { get; set; } = null!;
/// <summary>
/// Пользователь панели оператора
/// </summary>
public string? TelemetryUserName { get; set; }
/// <summary>
/// Ключевой параметр операции
/// </summary>
[Required]
public double Value { get; set; }
/// <summary>
/// Доп. инфо по операции
/// </summary>
public IDictionary<string, object> ExtraData { get; set; } = new Dictionary<string, object>();
}

View File

@ -5,7 +5,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations;
public class DetectableTelemetry
{
public DateTimeOffset DateTime { get; set; }
public int? IdUser { get; set; }
public int Mode { get; set; }
public float WellDepth { get; set; }
public float Pressure { get; set; }

View File

@ -1,4 +1,4 @@
using AsbCloudDb.Model;
using AsbCloudApp.Data.DetectedOperation;
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
@ -7,6 +7,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
public int TelemetryBegin { get; set; }
public int TelemetryEnd { get; set; }
public DetectedOperation Operation { get; set; } = null!;
public DetectedOperationDto Operation { get; set; } = null!;
}
}