package com.huashe.park.infrastructure.cfg.ids;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.huashe.park.common.EnhancedIDGenerator;

@Configuration
public class IdCfg {
    @Bean
    public EnhancedIDGenerator byte8Id(@Value("${id.generator.machine-id:1}") int machineId) {
        return new EnhancedIDGenerator(machineId);
    }
}
