diff --git a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs index f12fd6f3..1030a826 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; namespace AsbCloudApp.Data.DailyReport.Blocks.WellOperation; @@ -8,13 +9,15 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.WellOperation; /// public class WellOperationBlockDto { - /// - /// Продолжительность бурения за секцию - /// + /// + /// Продолжительность бурения за секцию + /// + [Required] public double SectionDrillingHours { get; set; } /// /// Операции проводимые на скважине /// + [Required] public IEnumerable WellOperations { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs b/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs index 46d82e6b..0137754e 100644 --- a/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs +++ b/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.GTR { @@ -10,21 +11,25 @@ namespace AsbCloudApp.Data.GTR /// /// Record Id /// + [Required] public int IdRecord { get; set; } /// /// Item Id /// + [Required] public int IdItem { get; set; } /// /// Дата создания записи /// + [Required] public DateTime Date { get; set; } /// /// Значение /// + [Required] public JsonValue Value { get; set; } = default!; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/GTR/WitsRecordDto.cs b/AsbCloudApp/Data/GTR/WitsRecordDto.cs index 28e6ba81..4e5da733 100644 --- a/AsbCloudApp/Data/GTR/WitsRecordDto.cs +++ b/AsbCloudApp/Data/GTR/WitsRecordDto.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.GTR { @@ -11,16 +12,19 @@ namespace AsbCloudApp.Data.GTR /// /// Id записи /// + [Required] public int Id { get; set; } /// /// Дата создания записи /// + [Required] public DateTime Date { get; set; } /// /// Параметры. Ключ - id_item. ValueContainer содержит значение. /// + [Required] public Dictionary Items { get; set; } = new(); } } diff --git a/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs b/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs index ba4fc8fb..35a99e7c 100644 --- a/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs @@ -14,7 +14,8 @@ public class WellSectionPlanDto : ItemInfoDto, /// public int Id { get; set; } - /// + /// + [Required] public int IdWell { get; set; } /// diff --git a/AsbCloudApp/Data/WellCaseDto.cs b/AsbCloudApp/Data/WellCaseDto.cs index 867d4426..0241faf6 100644 --- a/AsbCloudApp/Data/WellCaseDto.cs +++ b/AsbCloudApp/Data/WellCaseDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; namespace AsbCloudApp.Data @@ -11,16 +12,19 @@ namespace AsbCloudApp.Data /// /// Скважина /// + [Required] public int IdWell { get; set; } /// /// Разрешение для текущего пользователя добавлять ответственных /// + [Required] public bool PermissionToSetPubliher { get; set; } = true; /// /// Документ дела скважины /// + [Required] public IEnumerable WellFinalDocuments { get; set; } = Enumerable.Empty(); } diff --git a/AsbCloudApp/Data/WellCompositeDto.cs b/AsbCloudApp/Data/WellCompositeDto.cs index 4f5966b2..6fe39a40 100644 --- a/AsbCloudApp/Data/WellCompositeDto.cs +++ b/AsbCloudApp/Data/WellCompositeDto.cs @@ -1,4 +1,6 @@ -namespace AsbCloudApp.Data +using System.ComponentModel.DataAnnotations; + +namespace AsbCloudApp.Data { /// /// DTO элемент композитной скважины @@ -6,16 +8,19 @@ public class WellCompositeDto : IWellRelated { /// + [Required] public int IdWell { get; set; } /// /// id скважины входящей в композитную для этой /// + [Required] public int IdWellSrc { get; set; } /// /// id секции скважины входящей в композитную для этой /// + [Required] public int IdWellSectionType { get; set; } } } diff --git a/AsbCloudApp/Data/WellDto.cs b/AsbCloudApp/Data/WellDto.cs index 979d6885..30f524c2 100644 --- a/AsbCloudApp/Data/WellDto.cs +++ b/AsbCloudApp/Data/WellDto.cs @@ -19,6 +19,7 @@ namespace AsbCloudApp.Data /// 1 - в работе, /// 2 - завершена /// + [Required] public int IdState { get; set; } } diff --git a/AsbCloudApp/Data/WellFinalDocumentDto.cs b/AsbCloudApp/Data/WellFinalDocumentDto.cs index 1dab3ac0..a60afd6c 100644 --- a/AsbCloudApp/Data/WellFinalDocumentDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using AsbCloudApp.Data.User; @@ -12,6 +13,7 @@ namespace AsbCloudApp.Data /// /// Идентификатор категории файла /// + [Required] public int IdCategory { get; set; } /// @@ -22,16 +24,19 @@ namespace AsbCloudApp.Data /// /// Разрешение для текущего пользователя загружать документ /// + [Required] public bool PermissionToUpload { get; set; } = false; /// /// Список ответственных /// + [Required] public IEnumerable Publishers { get; set; } = Enumerable.Empty(); /// /// Количество файлов этой категории загруженных ранее /// + [Required] public int FilesCount { get; set; } /// diff --git a/AsbCloudApp/Data/WellFinalDocumentInputDto.cs b/AsbCloudApp/Data/WellFinalDocumentInputDto.cs index 80052e5c..75cb0ca3 100644 --- a/AsbCloudApp/Data/WellFinalDocumentInputDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentInputDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; namespace AsbCloudApp.Data @@ -11,11 +12,13 @@ namespace AsbCloudApp.Data /// /// Идентификатор категории файла /// + [Required] public int IdCategory { get; set; } /// /// Список ответственных /// + [Required] public IEnumerable IdsPublishers { get; set; } = Enumerable.Empty(); } } diff --git a/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs b/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs index 789dc9c0..f08c67e3 100644 --- a/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { @@ -10,16 +11,19 @@ namespace AsbCloudApp.Data /// /// Вышка /// + [Required] public int IdWell { get; set; } /// /// Наименование категории файла /// + [Required] public int IdCategory { get; set; } /// /// Файлы /// + [Required] public IEnumerable Files { get; set; } = null!; } } diff --git a/AsbCloudApp/Data/WellGroupOpertionDto.cs b/AsbCloudApp/Data/WellGroupOpertionDto.cs index 0839045c..acd8221d 100644 --- a/AsbCloudApp/Data/WellGroupOpertionDto.cs +++ b/AsbCloudApp/Data/WellGroupOpertionDto.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace AsbCloudApp.Data; @@ -10,6 +11,7 @@ public class WellGroupOpertionDto /// /// Id категории /// + [Required] public int IdCategory { get; set; } /// @@ -26,11 +28,13 @@ public class WellGroupOpertionDto /// /// Количество операций /// + [Required] public int Count { get; set; } /// /// Суммарное время операций, мин /// + [Required] public double TotalMinutes { get; set; } /// @@ -51,6 +55,7 @@ public class WellGroupOpertionDto /// /// Общая глубина забоя /// + [Required] public double DeltaDepth { get; set; } /// diff --git a/AsbCloudApp/Data/WellOperationCategoryDto.cs b/AsbCloudApp/Data/WellOperationCategoryDto.cs index 37a5178b..108a31f0 100644 --- a/AsbCloudApp/Data/WellOperationCategoryDto.cs +++ b/AsbCloudApp/Data/WellOperationCategoryDto.cs @@ -8,6 +8,7 @@ namespace AsbCloudApp.Data public class WellOperationCategoryDto : IId { /// + [Required] public int Id { get; set; } /// diff --git a/AsbCloudApp/Data/WellOperationPlanDto.cs b/AsbCloudApp/Data/WellOperationPlanDto.cs index be469948..5c1bac9f 100644 --- a/AsbCloudApp/Data/WellOperationPlanDto.cs +++ b/AsbCloudApp/Data/WellOperationPlanDto.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; namespace AsbCloudApp.Data @@ -14,6 +15,7 @@ namespace AsbCloudApp.Data /// /// коллекция плановых операций /// + [Required] public IEnumerable WellOperationsPlan { get; set; } = Enumerable.Empty(); /// diff --git a/AsbCloudApp/Data/WellSectionTypeDto.cs b/AsbCloudApp/Data/WellSectionTypeDto.cs index 28e9ba68..f8eef939 100644 --- a/AsbCloudApp/Data/WellSectionTypeDto.cs +++ b/AsbCloudApp/Data/WellSectionTypeDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace AsbCloudApp.Data; /// @@ -5,18 +7,21 @@ namespace AsbCloudApp.Data; /// public class WellSectionTypeDto : IId { - /// - /// Id секции - /// + /// + /// Id секции + /// + [Required] public int Id { get; set; } /// /// Название типа секции /// + [Required] public string Caption { get; set; } = null!; /// /// Порядок /// + [Required] public float Order { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/WellboreDto.cs b/AsbCloudApp/Data/WellboreDto.cs index 68c5695b..4edf6256 100644 --- a/AsbCloudApp/Data/WellboreDto.cs +++ b/AsbCloudApp/Data/WellboreDto.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data; @@ -15,30 +16,36 @@ public class WellboreDto /// /// Идентификатор /// + [Required] public int Id { get; set; } /// /// Название /// + [Required] public string Name { get; set; } = null!; - + /// /// Начальная глубина ствола /// + [Required] public double DepthStart { get; set; } - + /// /// Конечная глубина скважины /// + [Required] public double DepthEnd { get; set; } - + /// /// Дата начала первой операции /// + [Required] public DateTimeOffset DateStart { get; set; } - + /// /// Дата завершения последней операции /// + [Required] public DateTimeOffset DateEnd { get; set; } } \ No newline at end of file