< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Domain.Entities.Application
Assembly: ArturRios.Heimdall.Domain
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Domain/ArturRios.Heimdall.Domain/Entities/Application.cs
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 50
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 10
Fully covered methods: 10
Total methods: 10
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_PublicId()100%11100%
get_Name()100%11100%
get_IsDeleted()100%11100%
get_ScopeId()100%11100%
get_OwnerId()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_Scope()100%11100%
get_Owner()100%11100%
get_Credentials()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Domain/ArturRios.Heimdall.Domain/Entities/Application.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using ArturRios.Data.Relational.Core.Entities;
 3
 4namespace ArturRios.Heimdall.Domain.Entities;
 5
 6/// <summary>
 7///     A registered non-human identity representing another system. Belongs to exactly one
 8///     <see cref="Scope" /> and is owned by exactly one <see cref="Person" /> — an existing,
 9///     non-logically-deleted <c>ScopeAdmin</c> who owns that scope. A <c>User</c> may never own an
 10///     application (FR-AP-03).
 11/// </summary>
 12public class Application : Entity<long>
 13{
 14    /// <summary>
 15    ///     External identifier, generated on creation and used everywhere the application is
 16    ///     addressed from outside the database (API paths, response bodies). The internal
 17    ///     <see cref="Entity{TKey}.Id" /> is never exposed to callers.
 18    /// </summary>
 113419    public Guid PublicId { get; set; } = Guid.NewGuid();
 20
 21    /// <summary>Application display name. Required, max 200 characters.</summary>
 22    [MaxLength(200)]
 75923    public string Name { get; set; } = string.Empty;
 24
 25    /// <summary>Logical deletion flag. Logically deleted applications are excluded from default queries.</summary>
 36426    public bool IsDeleted { get; set; }
 27
 28    /// <summary>Foreign key to the owning <see cref="Scope" /> (internal Id). Required.</summary>
 38129    public long ScopeId { get; set; }
 30
 31    /// <summary>Foreign key to the owning <see cref="Person" /> (internal Id). Required.</summary>
 31032    public long OwnerId { get; set; }
 33
 34    /// <summary>Creation timestamp.</summary>
 10535    public DateTime CreatedAt { get; set; }
 36
 37    /// <summary>Last update timestamp.</summary>
 15438    public DateTime UpdatedAt { get; set; }
 39
 40    // Navigation properties
 41
 42    /// <summary>The scope this application belongs to.</summary>
 35343    public Scope Scope { get; set; } = null!;
 44
 45    /// <summary>The person that owns this application.</summary>
 22746    public Person Owner { get; set; } = null!;
 47
 48    /// <summary>The secrets this application can exchange for an application token (UC-53).</summary>
 39249    public ICollection<ApplicationCredential> Credentials { get; set; } = new List<ApplicationCredential>();
 50}