refactor(mock): convert mock ids to numeric strings

This commit is contained in:
zetaloop
2026-02-28 07:26:15 +08:00
parent f5df00df4e
commit 527d08fb81
18 changed files with 464 additions and 447 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
let counter = 0
export function generateId(prefix: string) {
void prefix
counter += 1
return `${prefix}-${Date.now()}-${counter}`
const now = Date.now().toString()
const suffix = counter.toString().padStart(3, "0")
return `${now}${suffix}`
}