using MongoDB.Bson.Serialization.Attributes;

namespace StellaOps.Scanner.Storage.Catalog;

[BsonIgnoreExtraElements]
public sealed class LayerDocument
{
    [BsonId]
    public string LayerDigest { get; set; } = string.Empty;

    [BsonElement("mediaType")]
    public string MediaType { get; set; } = string.Empty;

    [BsonElement("sizeBytes")]
    public long SizeBytes { get; set; }
        = 0;

    [BsonElement("createdAt")]
    public DateTime CreatedAtUtc { get; set; }
        = DateTime.UtcNow;

    [BsonElement("lastSeenAt")]
    public DateTime LastSeenAtUtc { get; set; }
        = DateTime.UtcNow;
}
