🐛 fix: move prisma id generator to service and repo

This commit is contained in:
2026-01-29 02:10:01 +07:00
parent adc38cdfd3
commit e305d955f1
6 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,8 @@
import { generateUUIDv7 } from "./uuidv7";
function createManyWithUUID<T extends { id?: string }>(items: T[]): T[] {
return items.map((i) => ({
...i,
id: i.id ?? generateUUIDv7(),
}));
}