You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- from .Options import IdGeneratorOptions
- from .SnowFlakeM1 import SnowFlakeM1
-
- class DefaultIdGenerator():
-
- def SetIdGernerator(self, options:IdGeneratorOptions) :
- if options.BaseTime < 100000 :
- raise ValueError ("BaseTime error.")
-
- self.SnowFlake= SnowFlakeM1(options)
-
- def NextId(self) -> int:
- """
- 获取新的UUID
- """
- return self.SnowFlake.NextId()
|