feat: CUID & fix: reorder bug
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CarManagerV3.Util;
|
||||
|
||||
namespace CarManagerV3
|
||||
{
|
||||
@@ -115,12 +116,15 @@ namespace CarManagerV3
|
||||
int numericId = 0;
|
||||
if ((string.IsNullOrWhiteSpace(id) || int.TryParse(id, out numericId)) && id != "0")
|
||||
{
|
||||
id = Guid.NewGuid().ToString();
|
||||
id = CUID.NewCUID().ToString();
|
||||
if (numericId > 0)
|
||||
{
|
||||
order = numericId + order;
|
||||
}
|
||||
|
||||
}
|
||||
if(id.Length > 8)
|
||||
{
|
||||
id = CUID.NewCUID().ToString();
|
||||
}
|
||||
// Sets the properties using the setters to ensure validation is applied.
|
||||
this.id = id;
|
||||
|
||||
Reference in New Issue
Block a user