Product and variant creation

This commit is contained in:
Sebastian Rindom
2020-06-29 22:03:32 +02:00
parent ae372de305
commit ea0c563bd6
3 changed files with 50 additions and 3 deletions
@@ -14,6 +14,8 @@ class ProductVariantModel extends BaseModel {
title: { type: String, required: true },
prices: { type: [MoneyAmountSchema], default: [], required: true },
options: { type: [OptionValueSchema], default: [] },
sku: { type: String, unique: true, sparse: true },
ean: { type: String, unique: true, sparse: true },
image: { type: String, default: "" },
published: { type: Boolean, default: false },
inventory_quantity: { type: Number, default: 0 },
+1 -1
View File
@@ -13,7 +13,7 @@ class ProductModel extends BaseModel {
title: { type: String, required: true },
description: { type: String, default: "" },
tags: { type: String, default: "" },
handle: { type: String, required: true, unique: true },
handle: { type: String, unique: true, sparse: true },
images: { type: [String], default: [] },
options: { type: [OptionSchema], default: [] },
variants: { type: [String], default: [] },