< Summary

Information
Class: OzonDomains.Models.Authorization.DataScope
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/DataScope.cs
Line coverage
90%
Covered lines: 10
Uncovered lines: 1
Coverable lines: 11
Total lines: 36
Line coverage: 90.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_Code()100%11100%
get_DisplayName()100%11100%
get_EntityName()100%11100%
get_FilterExpression()100%11100%
get_Description()100%210%
get_IsActive()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_RoleLinks()100%11100%
get_UserLinks()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace OzonDomains.Models.Authorization;
 4
 5/// <summary>
 6/// Набор данных (row-level фильтр) для конкретной сущности.
 7/// FilterExpression — Dynamic LINQ выражение, применяемое к IQueryable.
 8/// </summary>
 9public class DataScope
 10{
 2511    public int Id { get; set; }
 12
 13    [Required, MaxLength(150)]
 4814    public string Code { get; set; } = string.Empty;
 15
 16    [Required, MaxLength(300)]
 3817    public string DisplayName { get; set; } = string.Empty;
 18
 19    [Required, MaxLength(150)]
 4820    public string EntityName { get; set; } = string.Empty;
 21
 22    /// <summary>Dynamic LINQ выражение, например: "CreatedById == @userId".</summary>
 23    [Required]
 4824    public string FilterExpression { get; set; } = string.Empty;
 25
 26    [MaxLength(2000)]
 027    public string? Description { get; set; }
 28
 3829    public bool IsActive { get; set; } = true;
 30
 2531    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 2532    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 33
 2534    public virtual ICollection<RoleDataScope> RoleLinks { get; set; } = new List<RoleDataScope>();
 2535    public virtual ICollection<UserDataScope> UserLinks { get; set; } = new List<UserDataScope>();
 36}