mirror of
https://github.com/andwati/order-service.git
synced 2026-10-25 05:22:15 +00:00
feat: update default value for _id fields to use a function for uuid generation
This commit is contained in:
@@ -43,7 +43,7 @@ const orderSchema = new Schema<OrderDocument>(
|
||||
{
|
||||
_id: {
|
||||
type: String,
|
||||
default: uuidv4,
|
||||
default: () => uuidv4(),
|
||||
},
|
||||
userId: {
|
||||
type: String,
|
||||
|
||||
@@ -14,7 +14,7 @@ const productSchema = new Schema<ProductDocument>(
|
||||
{
|
||||
_id: {
|
||||
type: String,
|
||||
default: uuidv4,
|
||||
default: () => uuidv4(),
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
|
||||
@@ -16,7 +16,7 @@ const userSchema = new Schema<UserDocument>(
|
||||
{
|
||||
_id: {
|
||||
type: String,
|
||||
default: uuidv4,
|
||||
default: () => uuidv4(),
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
|
||||
Reference in New Issue
Block a user