< Summary

Information
Class: OzonOrdersWeb.Areas.Admin.Models.DataScopeEditVm
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Admin/Models/PageViewModels.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 156
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%210%
get_Code()100%210%
get_DisplayName()100%210%
get_EntityName()100%210%
get_FilterExpression()100%210%
get_Description()100%210%
get_IsActive()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Admin/Models/PageViewModels.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace OzonOrdersWeb.Areas.Admin.Models;
 4
 5/// <summary>
 6/// Элемент иерархического списка страниц.
 7/// </summary>
 8public class PageListItemVm
 9{
 10    public int Id { get; set; }
 11    public int? ParentId { get; set; }
 12    public int Depth { get; set; }
 13    public string Code { get; set; } = string.Empty;
 14    public string DisplayName { get; set; } = string.Empty;
 15    public string? Area { get; set; }
 16    public string Controller { get; set; } = string.Empty;
 17    public string Action { get; set; } = string.Empty;
 18    public bool IsMenuItem { get; set; }
 19    public bool IsActive { get; set; }
 20    public string? Icon { get; set; }
 21    public int SortOrder { get; set; }
 22}
 23
 24public class PageEditVm
 25{
 26    public int Id { get; set; }
 27
 28    [Required, StringLength(200)]
 29    [Display(Name = "Код страницы")]
 30    public string Code { get; set; } = string.Empty;
 31
 32    [Required, StringLength(300)]
 33    [Display(Name = "Отображаемое имя")]
 34    public string DisplayName { get; set; } = string.Empty;
 35
 36    [StringLength(100)]
 37    [Display(Name = "Area")]
 38    public string? Area { get; set; }
 39
 40    [Required, StringLength(100)]
 41    [Display(Name = "Controller")]
 42    public string Controller { get; set; } = string.Empty;
 43
 44    [Required, StringLength(100)]
 45    [Display(Name = "Action")]
 46    public string Action { get; set; } = string.Empty;
 47
 48    [Display(Name = "Родительская страница")]
 49    public int? ParentId { get; set; }
 50
 51    [Display(Name = "Порядок")]
 52    public int SortOrder { get; set; }
 53
 54    [StringLength(100)]
 55    [Display(Name = "Иконка (CSS-класс)")]
 56    public string? Icon { get; set; }
 57
 58    [Display(Name = "Показывать в меню")]
 59    public bool IsMenuItem { get; set; } = true;
 60
 61    [Display(Name = "Активна")]
 62    public bool IsActive { get; set; } = true;
 63}
 64
 65public class FieldListItemVm
 66{
 67    public int Id { get; set; }
 68    public string EntityName { get; set; } = string.Empty;
 69    public string FieldName { get; set; } = string.Empty;
 70    public string DisplayName { get; set; } = string.Empty;
 71    public string FieldTypeName { get; set; } = string.Empty;
 72    public int? PageId { get; set; }
 73    public string? PageCode { get; set; }
 74    public bool IsActive { get; set; }
 75    public int SortOrder { get; set; }
 76    /// <summary>Колонка из фиксированного реестра — удаление из БД отключено.</summary>
 77    public bool IsRegistryColumn { get; set; }
 78}
 79
 80public class FieldEditVm
 81{
 82    public int Id { get; set; }
 83
 84    [StringLength(150)]
 85    [Display(Name = "Сущность")]
 86    public string EntityName { get; set; } = string.Empty;
 87
 88    [StringLength(150)]
 89    [Display(Name = "Имя поля (код)")]
 90    public string FieldName { get; set; } = string.Empty;
 91
 92    /// <summary>Только при создании: выбор колонки из реестра списка заказов.</summary>
 93    [Display(Name = "Колонка")]
 94    public string? SelectedCatalogFieldName { get; set; }
 95
 96    [Required, StringLength(300)]
 97    [Display(Name = "Отображаемое имя")]
 98    public string DisplayName { get; set; } = string.Empty;
 99
 100    [Display(Name = "Тип поля")]
 101    public int FieldType { get; set; } = 1;
 102
 103    [Display(Name = "Страница")]
 104    public int? PageId { get; set; }
 105
 106    [Display(Name = "Порядок")]
 107    public int SortOrder { get; set; }
 108
 109    [Display(Name = "Активно")]
 110    public bool IsActive { get; set; } = true;
 111
 112    /// <summary>Поле из фиксированного списка колонок списка заказов (редактирование кода/сущности ограничено).</summar
 113    public bool FromOrderListCatalog { get; set; }
 114
 115    public string? LegacyAccessKey { get; set; }
 116}
 117
 118public class DataScopeListItemVm
 119{
 120    public int Id { get; set; }
 121    public string Code { get; set; } = string.Empty;
 122    public string DisplayName { get; set; } = string.Empty;
 123    public string EntityName { get; set; } = string.Empty;
 124    public string FilterExpression { get; set; } = string.Empty;
 125    /// <summary>Краткая расшифровка (имена из справочников, границы диапазонов).</summary>
 126    public string? FilterSummary { get; set; }
 127    public bool IsActive { get; set; }
 128}
 129
 130public class DataScopeEditVm
 131{
 0132    public int Id { get; set; }
 133
 134    [Required, StringLength(150)]
 135    [Display(Name = "Код")]
 0136    public string Code { get; set; } = string.Empty;
 137
 138    [Required, StringLength(300)]
 139    [Display(Name = "Отображаемое имя")]
 0140    public string DisplayName { get; set; } = string.Empty;
 141
 142    [Required, StringLength(150)]
 143    [Display(Name = "Сущность")]
 0144    public string EntityName { get; set; } = string.Empty;
 145
 146    [Required]
 147    [Display(Name = "Dynamic LINQ выражение")]
 0148    public string FilterExpression { get; set; } = string.Empty;
 149
 150    [StringLength(2000)]
 151    [Display(Name = "Описание")]
 0152    public string? Description { get; set; }
 153
 154    [Display(Name = "Активно")]
 0155    public bool IsActive { get; set; } = true;
 156}