package de.effigenix.domain.production;

import java.util.UUID;

public record ProductionOrderId(String value) {

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

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

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