Update SnowFlakeSingle

This commit is contained in:
sunkaixuna 2021-08-04 12:23:48 +08:00
parent 45f74349de
commit 9075c4966d

View File

@ -10,9 +10,10 @@ namespace SqlSugar
{
public static readonly SnowFlakeSingle instance = new SnowFlakeSingle();
public static int WorkId = 1;
public static int DatacenterId = 1;
private SnowFlakeSingle()
{
worker = new DistributedSystem.Snowflake.IdWorker(WorkId, 1);
worker = new DistributedSystem.Snowflake.IdWorker(WorkId, DatacenterId);
}
static SnowFlakeSingle() { }
public static SnowFlakeSingle Instance