package com.test.bijihoudaun.util;

import com.fasterxml.uuid.Generators;
import com.fasterxml.uuid.impl.TimeBasedGenerator;

/**
 * uuidV7
 */
public class UuidV7 {
    /**
     * 生成uuidV7，生成的uuid有-
     */
    public static String uuid() {
        TimeBasedGenerator generator = Generators.timeBasedGenerator();
        return generator.generate().toString();
    }

    /**
     * 获取uuidV7，生成的uuid无-
     */
    public static String uuidNoHyphen() {
        return uuid().replace("-", "");
    }


}
