package com.social.media.domain.bot.valueobject;

import java.util.Objects;

/**
 * Value Object representing a User List ID
 */
public record UserListId(Long value) {
    
    public UserListId {
        Objects.requireNonNull(value, "User List ID cannot be null");
        if (value <= 0) {
            throw new IllegalArgumentException("User List ID must be positive");
        }
    }
    
    public static UserListId of(Long value) {
        return new UserListId(value);
    }
    
    public static UserListId of(String value) {
        return new UserListId(Long.valueOf(value));
    }
    
    public static UserListId generate() {
        // For JPA auto-generation, return null - will be populated by persistence layer
        return null;
    }
    
    @Override
    public String toString() {
        return String.valueOf(value);
    }
}
