分配设备
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user