package de.accso.flexinale.shared_kernel;

import java.io.Serializable;
import java.util.UUID;

public interface Identifiable  {
    record Id(String id) implements Serializable {
        public static Id of() {
            return uuid();
        }

        public static Id of(String id) {
            return new Id(id);
        }

        public static Id uuid() {
            return Id.of(UUID.randomUUID().toString());
        }

        public static String uuidString() {
            return UUID.randomUUID().toString();
        }
    }

    Id id();
}
