#nullable enable
using Baya.Domain.Common;

namespace Baya.Domain.Entities.Verification;

/// <summary>
/// Metadata for an uploaded evidence file — <b>bytes never touch the DB</b>. The file lives in object
/// storage behind a short-lived signed URL keyed by <see cref="ObjectStorageKey"/>; the
/// <see cref="IntegrityHash"/> detects tampering/swap after upload. Never public.
/// </summary>
public class VerificationDocument : BaseEntity<long>
{
    public long StepId { get; set; }
    public VerificationStep Step { get; set; } = null!;

    /// <summary>The opaque <c>IObjectStorage</c> key the bytes live under.</summary>
    public string ObjectStorageKey { get; set; } = string.Empty;

    /// <summary>Content hash (hex) to detect a later tamper/swap of the stored object.</summary>
    public string IntegrityHash { get; set; } = string.Empty;

    public string ContentType { get; set; } = string.Empty;
    public long FileSizeBytes { get; set; }
    public string? OriginalFileName { get; set; }

    public int UploadedByUserId { get; set; }

    public DateTimeOffset? DeletedAt { get; set; }
}
