Adds create order transactiom

This commit is contained in:
olivermrbl
2020-07-10 10:23:31 +02:00
parent b36e3e502d
commit 30c101a8be
4 changed files with 91 additions and 22 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class OrderModel extends BaseModel {
// awaiting, captured, refunded
payment_status: { type: String, default: "awaiting" },
email: { type: String, required: true },
cart_id: { type: String },
cart_id: { type: String, unique: true, sparse: true },
billing_address: { type: AddressSchema, required: true },
shipping_address: { type: AddressSchema, required: true },
items: { type: [LineItemSchema], required: true },