package go.kr.project.api.internal.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Random;

public final class TxIdUtil {
    private static final Random RANDOM = new Random();

    private TxIdUtil() {}

    public static String generate() {
        String time = new SimpleDateFormat("yyyyMMddHHmmssSSS", Locale.KOREA).format(new Date());
        int random = 100000 + RANDOM.nextInt(900000);
        return time + "_" + random;
    }
}
