< Summary

Information
Class: OzonDomains.Models.Authorization.AppField
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/AppField.cs
Line coverage
76%
Covered lines: 10
Uncovered lines: 3
Coverable lines: 13
Total lines: 35
Line coverage: 76.9%
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_EntityName()100%11100%
get_FieldName()100%11100%
get_DisplayName()100%11100%
get_FieldType()100%11100%
get_PageId()100%210%
get_Page()100%210%
get_SortOrder()100%210%
get_IsActive()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_RolePermissions()100%11100%
get_UserOverrides()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using OzonDomains.Models.Authorization.Enums;
 3
 4namespace OzonDomains.Models.Authorization;
 5
 6/// <summary>
 7/// Поле или столбец сущности, контролируемый системой прав доступа.
 8/// </summary>
 9public class AppField
 10{
 1811    public int Id { get; set; }
 12
 13    [Required, MaxLength(150)]
 5714    public string EntityName { get; set; } = string.Empty;
 15
 16    [Required, MaxLength(150)]
 5717    public string FieldName { get; set; } = string.Empty;
 18
 19    [Required, MaxLength(300)]
 5720    public string DisplayName { get; set; } = string.Empty;
 21
 4222    public FieldType FieldType { get; set; } = FieldType.Column;
 23
 024    public int? PageId { get; set; }
 025    public virtual AppPage? Page { get; set; }
 26
 027    public int SortOrder { get; set; }
 4428    public bool IsActive { get; set; } = true;
 29
 2930    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 2931    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 32
 2933    public virtual ICollection<RoleFieldPermission> RolePermissions { get; set; } = new List<RoleFieldPermission>();
 2934    public virtual ICollection<UserFieldOverride> UserOverrides { get; set; } = new List<UserFieldOverride>();
 35}