package de.effigenix.shared.security;

/**
 * Value Object representing an Actor (user or service account).
 * Abstracts from UserId to allow future extensibility (e.g., service accounts, API keys).
 *
 * Used for authorization and audit logging across all Bounded Contexts.
 */
public record ActorId(String value) {

    public static final ActorId SYSTEM = new ActorId("SYSTEM");

    public ActorId {
        if (value == null || value.isBlank()) {
            throw new IllegalArgumentException("ActorId cannot be null or empty");
        }
    }

    /**
     * Creates an ActorId from a string value.
     */
    public static ActorId of(String value) {
        return new ActorId(value);
    }
}
