feat(medusa,product,types): product type & tag store missing endpoints (#11057)
* wip: tag endpoints * feat: types, product types * feat: tests * fix: update product type schema
This commit is contained in:
@@ -6,7 +6,7 @@ const ProductType = model
|
||||
id: model.id({ prefix: "ptyp" }).primaryKey(),
|
||||
value: model.text().searchable(),
|
||||
metadata: model.json().nullable(),
|
||||
product: model.hasMany(() => Product, {
|
||||
products: model.hasMany(() => Product, {
|
||||
mappedBy: "type",
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@ const Product = model
|
||||
}),
|
||||
type: model
|
||||
.belongsTo(() => ProductType, {
|
||||
mappedBy: "product",
|
||||
mappedBy: "products",
|
||||
})
|
||||
.nullable(),
|
||||
tags: model.manyToMany(() => ProductTag, {
|
||||
|
||||
Reference in New Issue
Block a user