mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update SnowFlakeSingle
This commit is contained in:
@@ -10,9 +10,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public static readonly SnowFlakeSingle instance = new SnowFlakeSingle();
|
public static readonly SnowFlakeSingle instance = new SnowFlakeSingle();
|
||||||
public static int WorkId = 1;
|
public static int WorkId = 1;
|
||||||
|
public static int DatacenterId = 1;
|
||||||
private SnowFlakeSingle()
|
private SnowFlakeSingle()
|
||||||
{
|
{
|
||||||
worker = new DistributedSystem.Snowflake.IdWorker(WorkId, 1);
|
worker = new DistributedSystem.Snowflake.IdWorker(WorkId, DatacenterId);
|
||||||
}
|
}
|
||||||
static SnowFlakeSingle() { }
|
static SnowFlakeSingle() { }
|
||||||
public static SnowFlakeSingle Instance
|
public static SnowFlakeSingle Instance
|
||||||
|
Reference in New Issue
Block a user