< Summary

Information
Class: AsiBackbone.EntityFrameworkCore.Persistence.AsiBackboneAuditLedgerRecordEntity
Assembly: AsiBackbone.EntityFrameworkCore
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.EntityFrameworkCore/Persistence/AsiBackboneAuditLedgerRecordEntity.cs
Line coverage
100%
Covered lines: 39
Uncovered lines: 0
Coverable lines: 39
Total lines: 206
Line coverage: 100%
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_RecordId()100%11100%
get_SchemaVersion()100%11100%
get_EventId()100%11100%
get_AuditResidueId()100%11100%
get_OccurredUtc()100%11100%
get_RecordedUtc()100%11100%
get_ActorId()100%11100%
get_ActorType()100%11100%
get_ActorDisplayName()100%11100%
get_OperationName()100%11100%
get_Outcome()100%11100%
get_ReasonCodesJson()100%11100%
get_CorrelationId()100%11100%
get_TraceId()100%11100%
get_SpanId()100%11100%
get_ParentSpanId()100%11100%
get_DecisionLatencyMs()100%11100%
get_ConstraintSetHash()100%11100%
get_ConstraintCount()100%11100%
get_RiskScore()100%11100%
get_PolicyScope()100%11100%
get_TenantHash()100%11100%
get_OrganizationHash()100%11100%
get_EmitterStatus()100%11100%
get_EmitterProvider()100%11100%
get_OutboxSequence()100%11100%
get_GatewayExecutionId()100%11100%
get_DecisionStage()100%11100%
get_PolicyVersion()100%11100%
get_PolicyHash()100%11100%
get_HandshakeId()100%11100%
get_AcknowledgmentId()100%11100%
get_CapabilityTokenId()100%11100%
get_PreviousRecordHash()100%11100%
get_RecordHash()100%11100%
get_SignatureKeyId()100%11100%
get_SignatureAlgorithm()100%11100%
get_SignatureValue()100%11100%
get_MetadataJson()100%11100%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.EntityFrameworkCore/Persistence/AsiBackboneAuditLedgerRecordEntity.cs

#LineLine coverage
 1using AsiBackbone.Core.Actors;
 2using AsiBackbone.Core.Entities;
 3using AsiBackbone.Core.Serialization;
 4
 5namespace AsiBackbone.EntityFrameworkCore.Persistence;
 6
 7/// <summary>
 8/// Represents the Entity Framework Core persistence shape for an AsiBackbone audit ledger record.
 9/// </summary>
 10public sealed class AsiBackboneAuditLedgerRecordEntity : AsiBackboneEntity
 11{
 12    /// <summary>
 13    /// Gets or sets the stable audit ledger record identifier.
 14    /// </summary>
 9615    public string RecordId { get; set; } = string.Empty;
 16
 17    /// <summary>
 18    /// Gets or sets the serialized schema version for this audit ledger record.
 19    /// </summary>
 10420    public string SchemaVersion { get; set; } = AsiBackboneSchemaVersions.StableArtifactsV1;
 21
 22    /// <summary>
 23    /// Gets or sets the stable audit event identifier.
 24    /// </summary>
 9825    public string EventId { get; set; } = string.Empty;
 26
 27    /// <summary>
 28    /// Gets or sets the stable audit residue identifier.
 29    /// </summary>
 3430    public string? AuditResidueId { get; set; }
 31
 32    /// <summary>
 33    /// Gets or sets the UTC timestamp when the audited event occurred.
 34    /// </summary>
 4635    public DateTimeOffset OccurredUtc { get; set; }
 36
 37    /// <summary>
 38    /// Gets or sets the UTC timestamp when the ledger record was created by the host or storage adapter.
 39    /// </summary>
 4640    public DateTimeOffset RecordedUtc { get; set; }
 41
 42    /// <summary>
 43    /// Gets or sets the stable actor identifier associated with the event.
 44    /// </summary>
 9845    public string ActorId { get; set; } = string.Empty;
 46
 47    /// <summary>
 48    /// Gets or sets the actor type associated with the event.
 49    /// </summary>
 5050    public AsiBackboneActorType ActorType { get; set; }
 51
 52    /// <summary>
 53    /// Gets or sets the optional display name or label associated with the actor.
 54    /// </summary>
 4055    public string? ActorDisplayName { get; set; }
 56
 57    /// <summary>
 58    /// Gets or sets the operation name associated with the audited event.
 59    /// </summary>
 9860    public string OperationName { get; set; } = string.Empty;
 61
 62    /// <summary>
 63    /// Gets or sets the governance, constraint, or host-defined outcome associated with the event.
 64    /// </summary>
 9865    public string Outcome { get; set; } = string.Empty;
 66
 67    /// <summary>
 68    /// Gets or sets the serialized machine-readable reason codes associated with the event.
 69    /// </summary>
 9670    public string ReasonCodesJson { get; set; } = "[]";
 71
 72    /// <summary>
 73    /// Gets or sets the correlation identifier associated with the event, when supplied by the host.
 74    /// </summary>
 4675    public string? CorrelationId { get; set; }
 76
 77    /// <summary>
 78    /// Gets or sets the trace identifier associated with the event, when supplied by the host.
 79    /// </summary>
 4680    public string? TraceId { get; set; }
 81
 82    /// <summary>
 83    /// Gets or sets the span identifier associated with the event, when supplied by the host or observability adapter.
 84    /// </summary>
 3485    public string? SpanId { get; set; }
 86
 87    /// <summary>
 88    /// Gets or sets the parent span identifier associated with the event, when supplied by the host or observability ad
 89    /// </summary>
 3490    public string? ParentSpanId { get; set; }
 91
 92    /// <summary>
 93    /// Gets or sets the decision latency in milliseconds, when supplied by the host.
 94    /// </summary>
 3495    public long? DecisionLatencyMs { get; set; }
 96
 97    /// <summary>
 98    /// Gets or sets the hash of the evaluated constraint set, when supplied by the host.
 99    /// </summary>
 34100    public string? ConstraintSetHash { get; set; }
 101
 102    /// <summary>
 103    /// Gets or sets the number of evaluated constraints, when supplied by the host.
 104    /// </summary>
 34105    public int? ConstraintCount { get; set; }
 106
 107    /// <summary>
 108    /// Gets or sets the host-defined risk score associated with the decision, when supplied by the host.
 109    /// </summary>
 34110    public double? RiskScore { get; set; }
 111
 112    /// <summary>
 113    /// Gets or sets the policy scope associated with the decision, when supplied by the host.
 114    /// </summary>
 34115    public string? PolicyScope { get; set; }
 116
 117    /// <summary>
 118    /// Gets or sets the privacy-preserving tenant hash associated with the decision, when supplied by the host.
 119    /// </summary>
 34120    public string? TenantHash { get; set; }
 121
 122    /// <summary>
 123    /// Gets or sets the privacy-preserving organization hash associated with the decision, when supplied by the host.
 124    /// </summary>
 34125    public string? OrganizationHash { get; set; }
 126
 127    /// <summary>
 128    /// Gets or sets the provider-neutral emitter status, when supplied by the host or outbox provider.
 129    /// </summary>
 34130    public string? EmitterStatus { get; set; }
 131
 132    /// <summary>
 133    /// Gets or sets the provider-neutral emitter provider name, when supplied by the host or outbox provider.
 134    /// </summary>
 34135    public string? EmitterProvider { get; set; }
 136
 137    /// <summary>
 138    /// Gets or sets the outbox sequence associated with the event, when supplied by the host or outbox provider.
 139    /// </summary>
 34140    public long? OutboxSequence { get; set; }
 141
 142    /// <summary>
 143    /// Gets or sets the gateway execution identifier associated with the event, when supplied by the host or gateway pr
 144    /// </summary>
 34145    public string? GatewayExecutionId { get; set; }
 146
 147    /// <summary>
 148    /// Gets or sets the provider-neutral decision stage associated with the event, when supplied by the host.
 149    /// </summary>
 34150    public string? DecisionStage { get; set; }
 151
 152    /// <summary>
 153    /// Gets or sets the policy version associated with the event, when supplied by the host.
 154    /// </summary>
 46155    public string? PolicyVersion { get; set; }
 156
 157    /// <summary>
 158    /// Gets or sets the policy hash associated with the event, when supplied by the host.
 159    /// </summary>
 46160    public string? PolicyHash { get; set; }
 161
 162    /// <summary>
 163    /// Gets or sets the related responsibility or liability handshake identifier, when available.
 164    /// </summary>
 40165    public string? HandshakeId { get; set; }
 166
 167    /// <summary>
 168    /// Gets or sets the related acknowledgment identifier, when available.
 169    /// </summary>
 40170    public string? AcknowledgmentId { get; set; }
 171
 172    /// <summary>
 173    /// Gets or sets the related capability token identifier, when available.
 174    /// </summary>
 40175    public string? CapabilityTokenId { get; set; }
 176
 177    /// <summary>
 178    /// Gets or sets the previous ledger record hash, when supplied by a host or signing package.
 179    /// </summary>
 38180    public string? PreviousRecordHash { get; set; }
 181
 182    /// <summary>
 183    /// Gets or sets this ledger record hash, when supplied by a host or signing package.
 184    /// </summary>
 38185    public string? RecordHash { get; set; }
 186
 187    /// <summary>
 188    /// Gets or sets the signature key identifier, when supplied by a signing package or host.
 189    /// </summary>
 38190    public string? SignatureKeyId { get; set; }
 191
 192    /// <summary>
 193    /// Gets or sets the signature algorithm, when supplied by a signing package or host.
 194    /// </summary>
 38195    public string? SignatureAlgorithm { get; set; }
 196
 197    /// <summary>
 198    /// Gets or sets the signature value, when supplied by a signing package or host.
 199    /// </summary>
 38200    public string? SignatureValue { get; set; }
 201
 202    /// <summary>
 203    /// Gets or sets serialized framework-neutral audit metadata supplied by the host.
 204    /// </summary>
 96205    public string MetadataJson { get; set; } = "{}";
 206}