using System;
using MongoDB.Bson.Serialization.Attributes;

namespace StellaOps.Vexer.Storage.Mongo.Migrations;

internal sealed class VexMigrationRecord
{
    public VexMigrationRecord(string id, DateTimeOffset executedAt)
    {
        Id = string.IsNullOrWhiteSpace(id) ? throw new ArgumentException("Migration id must be provided.", nameof(id)) : id.Trim();
        ExecutedAt = executedAt;
    }

    [BsonId]
    public string Id { get; }

    public DateTimeOffset ExecutedAt { get; }
}
