namespace Big.Domain;
/// The identity of a aggregate — opaque, server-assigned,
/// and distinct from the OpenZaak zaak id (which the projection keys on). A value object so the
/// id can travel as a Flowable process variable and back without ever being a bare string.
public readonly record struct RegistrationId(Guid Value)
{
/// Mint a fresh identity for a newly submitted registration.
public static RegistrationId New() => new(Guid.NewGuid());
/// Rehydrate an id carried as a string (e.g. a Flowable process variable).
public static RegistrationId Parse(string value) => new(Guid.Parse(value));
public override string ToString() => Value.ToString();
}