分配设备

This commit is contained in:
2025-06-20 19:20:56 +08:00
parent b11d3ccd61
commit a02819261d
4 changed files with 44 additions and 5 deletions

View File

@ -0,0 +1,32 @@
package com.fuyuanshen.utils.enums;
/**
* @author: 默苍璃
* @date: 2025-06-2019:08
*/
/**
* 表示 NanoId 生成时使用的长度配置
*/
public enum NanoIdLengthEnum {
/**
* 默认设备类型 ID 长度
*/
DEVICE_TYPE_ID(10),
/**
* 更长的唯一标识符,用于高并发场景
*/
HIGH_CONCURRENCY(15);
private final int length;
NanoIdLengthEnum(int length) {
this.length = length;
}
public int getLength() {
return length;
}
}