From 350d12e8a058532677e257d53f4f553dcb19d85f Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Sun, 30 Jun 2024 13:44:40 +0500 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BF=D0=B8=D1=81=D1=8C=20=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...essMapPlanRecordingStaticMeasurementDto.cs | 21 +++++++++++++++++++ ...rocessMapPlanRecordingStaticMeasurement.cs | 3 +++ 2 files changed, 24 insertions(+) create mode 100644 AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRecordingStaticMeasurementDto.cs diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRecordingStaticMeasurementDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRecordingStaticMeasurementDto.cs new file mode 100644 index 00000000..f3f4b692 --- /dev/null +++ b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRecordingStaticMeasurementDto.cs @@ -0,0 +1,21 @@ +using System.ComponentModel.DataAnnotations; + +namespace AsbCloudApp.Data.ProcessMaps; + +/// +/// РТК план записи статического замера +/// +public class ProcessMapPlanRecordingStaticMeasurementDto : ProcessMapPlanBaseDto +{ + /// + /// Время записи замера, сек + /// + [Range(0.0, 1800.0, ErrorMessage = "Время записи замера, сек., должно быть в пределах от 0 до 1800")] + public double MeasurementRecordingTime { get; set; } + + /// + /// Примечание + /// + [StringLength(1024, ErrorMessage = "Примечание, не должно превышать 1024 символов")] + public string Note { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRecordingStaticMeasurement.cs b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRecordingStaticMeasurement.cs index 0cfd503f..c865ee36 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRecordingStaticMeasurement.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRecordingStaticMeasurement.cs @@ -13,6 +13,9 @@ public class ProcessMapPlanRecordingStaticMeasurement : ProcessMapPlanBase [Required] public double MeasurementRecordingTime { get; set; } + [Column("note"), Comment("Примечание"), StringLength(1024)] + public string Note { get; set; } = string.Empty; + [ForeignKey(nameof(IdPrevious))] public virtual ProcessMapPlanRecordingStaticMeasurement? Previous { get; set; } } \ No newline at end of file