Cambio a UUIDv7 para mejor rendimiento en BD
This commit is contained in:
parent
78db3318fc
commit
d71b3efc8b
@ -1,4 +1,4 @@
|
|||||||
import { Result, generateUUIDv4 } from "@repo/rdx-utils";
|
import { generateUUIDv7, Result } from "@repo/rdx-utils";
|
||||||
import { z } from "zod/v4";
|
import { z } from "zod/v4";
|
||||||
import { translateZodValidationError } from "../helpers";
|
import { translateZodValidationError } from "../helpers";
|
||||||
import { ValueObject } from "./value-object";
|
import { ValueObject } from "./value-object";
|
||||||
@ -30,7 +30,7 @@ export class UniqueID extends ValueObject<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static generateNewID(): UniqueID {
|
static generateNewID(): UniqueID {
|
||||||
return new UniqueID(generateUUIDv4());
|
return new UniqueID(generateUUIDv7());
|
||||||
}
|
}
|
||||||
|
|
||||||
getProps(): string {
|
getProps(): string {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user