feat: update default value for _id fields to use a function for uuid generation

This commit is contained in:
2026-01-13 00:32:11 +03:00
parent 2efdc8910f
commit 0a3e5cfa95
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ const orderSchema = new Schema<OrderDocument>(
{
_id: {
type: String,
default: uuidv4,
default: () => uuidv4(),
},
userId: {
type: String,
+1 -1
View File
@@ -14,7 +14,7 @@ const productSchema = new Schema<ProductDocument>(
{
_id: {
type: String,
default: uuidv4,
default: () => uuidv4(),
},
name: {
type: String,
+1 -1
View File
@@ -16,7 +16,7 @@ const userSchema = new Schema<UserDocument>(
{
_id: {
type: String,
default: uuidv4,
default: () => uuidv4(),
},
email: {
type: String,