Product and variant creation
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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: [] },
|
||||
|
||||
Reference in New Issue
Block a user