mirror of
https://github.com/andwati/order-service.git
synced 2026-11-28 20:08:46 +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: {
|
_id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uuidv4,
|
default: () => uuidv4(),
|
||||||
},
|
},
|
||||||
userId: {
|
userId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const productSchema = new Schema<ProductDocument>(
|
|||||||
{
|
{
|
||||||
_id: {
|
_id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uuidv4,
|
default: () => uuidv4(),
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const userSchema = new Schema<UserDocument>(
|
|||||||
{
|
{
|
||||||
_id: {
|
_id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uuidv4,
|
default: () => uuidv4(),
|
||||||
},
|
},
|
||||||
email: {
|
email: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user