58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
// -----------------------------------------------------------------------------
|
|
// ArtifactIndexEntry.cs
|
|
// Sprint: SPRINT_20260118_017_Evidence_artifact_store_unification
|
|
// Task: AS-003 - Create ArtifactStore PostgreSQL index
|
|
// Description: Artifact index entry model for storage and querying
|
|
// -----------------------------------------------------------------------------
|
|
using StellaOps.Artifact.Core;
|
|
|
|
namespace StellaOps.Artifact.Infrastructure;
|
|
|
|
/// <summary>
|
|
/// Artifact index entry for PostgreSQL storage.
|
|
/// </summary>
|
|
public sealed record ArtifactIndexEntry
|
|
{
|
|
/// <summary>Primary key.</summary>
|
|
public Guid Id { get; init; } = Guid.NewGuid();
|
|
|
|
/// <summary>Tenant ID.</summary>
|
|
public required Guid TenantId { get; init; }
|
|
|
|
/// <summary>Package URL or bom-ref.</summary>
|
|
public required string BomRef { get; init; }
|
|
|
|
/// <summary>CycloneDX serialNumber.</summary>
|
|
public required string SerialNumber { get; init; }
|
|
|
|
/// <summary>Artifact ID.</summary>
|
|
public required string ArtifactId { get; init; }
|
|
|
|
/// <summary>Full storage key/path.</summary>
|
|
public required string StorageKey { get; init; }
|
|
|
|
/// <summary>Artifact type.</summary>
|
|
public required ArtifactType Type { get; init; }
|
|
|
|
/// <summary>Content type (MIME).</summary>
|
|
public required string ContentType { get; init; }
|
|
|
|
/// <summary>SHA-256 hash.</summary>
|
|
public required string Sha256 { get; init; }
|
|
|
|
/// <summary>Size in bytes.</summary>
|
|
public required long SizeBytes { get; init; }
|
|
|
|
/// <summary>When the artifact was stored.</summary>
|
|
public required DateTimeOffset CreatedAt { get; init; }
|
|
|
|
/// <summary>When the index entry was last updated.</summary>
|
|
public DateTimeOffset? UpdatedAt { get; init; }
|
|
|
|
/// <summary>Whether the artifact has been deleted.</summary>
|
|
public bool IsDeleted { get; init; }
|
|
|
|
/// <summary>Deletion timestamp.</summary>
|
|
public DateTimeOffset? DeletedAt { get; init; }
|
|
}
|