using MongoDB.Bson.Serialization.Attributes;

namespace StellaOps.Scanner.Storage.Catalog;

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

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

    [BsonElement("class")]
    public string Class { get; set; } = "default";

    [BsonElement("expiresAt")]
    [BsonIgnoreIfNull]
    public DateTime? ExpiresAtUtc { get; set; }
        = null;

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