< Summary

Information
Class: OzonDomains.Models.Authorization.AppPage
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/AppPage.cs
Line coverage
85%
Covered lines: 17
Uncovered lines: 3
Coverable lines: 20
Total lines: 53
Line coverage: 85%
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%11100%
get_Code()100%11100%
get_DisplayName()100%11100%
get_Area()100%11100%
get_Controller()100%11100%
get_Action()100%11100%
get_ParentId()100%11100%
get_Parent()100%210%
get_Children()100%11100%
get_SortOrder()100%11100%
get_Icon()100%11100%
get_AccentClass()100%210%
get_IsSectionHeader()100%210%
get_IsMenuItem()100%11100%
get_IsActive()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_Fields()100%11100%
get_RolePermissions()100%11100%
get_UserOverrides()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/AppPage.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace OzonDomains.Models.Authorization;
 4
 5/// <summary>
 6/// Страница или модуль приложения, используемые для построения меню и проверки доступа.
 7/// </summary>
 8public class AppPage
 9{
 16710    public int Id { get; set; }
 11
 12    /// <summary>Уникальный код страницы: "Orders.Index", "Products.Edit".</summary>
 13    [Required, MaxLength(200)]
 20814    public string Code { get; set; } = string.Empty;
 15
 16    [Required, MaxLength(300)]
 20817    public string DisplayName { get; set; } = string.Empty;
 18
 19    [MaxLength(100)]
 7520    public string? Area { get; set; }
 21
 22    [Required, MaxLength(100)]
 19623    public string Controller { get; set; } = string.Empty;
 24
 25    [Required, MaxLength(100)]
 19626    public string Action { get; set; } = string.Empty;
 27
 8528    public int? ParentId { get; set; }
 029    public virtual AppPage? Parent { get; set; }
 10730    public virtual ICollection<AppPage> Children { get; set; } = new List<AppPage>();
 31
 7532    public int SortOrder { get; set; }
 33
 34    [MaxLength(100)]
 7535    public string? Icon { get; set; }
 36
 37    /// <summary>Класс оформления (Bootstrap), например <c>link-success</c>, <c>text-info</c> — для отображения в матриц
 38    [MaxLength(50)]
 039    public string? AccentClass { get; set; }
 40
 41    /// <summary>Группирующий заголовок (не соответствует маршруту); чекбоксы прав в матрице не показываются.</summary>
 042    public bool IsSectionHeader { get; set; }
 43
 14944    public bool IsMenuItem { get; set; } = true;
 16345    public bool IsActive { get; set; } = true;
 46
 10747    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 10748    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 49
 10750    public virtual ICollection<AppField> Fields { get; set; } = new List<AppField>();
 10751    public virtual ICollection<RolePagePermission> RolePermissions { get; set; } = new List<RolePagePermission>();
 10752    public virtual ICollection<UserPageOverride> UserOverrides { get; set; } = new List<UserPageOverride>();
 53}