package de.effigenix.domain.production;

import java.util.UUID;

public record BatchId(String value) {

    public BatchId {
        if (value == null || value.isBlank()) {
            throw new IllegalArgumentException("BatchId must not be blank");
        }
    }

    public static BatchId generate() {
        return new BatchId(UUID.randomUUID().toString());
    }

    public static BatchId of(String value) {
        return new BatchId(value);
    }
}
