< Summary

Information
Class: OzonDomains.Models.AccessControl.AccessProfile
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/AccessControl/AccessProfile.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 29
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
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_Name()100%11100%
get_AvailableOrderColumns()100%11100%
get_DataScopeSets()100%11100%
get_ScopeItems()50%44100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/AccessControl/AccessProfile.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3using System.Text.Json.Serialization;
 4
 5namespace OzonDomains.Models.AccessControl;
 6
 7public class AccessProfile
 8{
 1729    public int Id { get; set; }
 10
 11    [Display(Name = "Название")]
 25112    public string? Name { get; set; }
 13
 14    [Display(Name = "Доступные столбцы в таблице заказов")]
 3215    public List<string>? AvailableOrderColumns { get; set; }
 16
 17    [JsonIgnore]
 21318    public virtual ICollection<DataScopeSet> DataScopeSets { get; set; } = new List<DataScopeSet>();
 19
 20    /// <summary>
 21    /// Объединение всех Items из всех прикреплённых наборов данных.
 22    /// Используется в логике фильтрации заказов.
 23    /// Если наборов нет — фильтрация не применяется (видны все данные).
 24    /// </summary>
 25    [NotMapped]
 26    [JsonIgnore]
 27    public IEnumerable<DataScopeSetItem> ScopeItems =>
 1728        DataScopeSets?.SelectMany(s => s.Items) ?? Enumerable.Empty<DataScopeSetItem>();
 29}