1 import { model } from "@medusajs/framework/utils"
2 import ProductVariant from "./product-variant"
3 import ProductImage from "./product-image"
4
5 /**
6 * @since 2.11.2
7 */
8 const ProductVariantProductImage = model.define("ProductVariantProductImage", {
9 id: model.id({ prefix: "pvpi" }).primaryKey(),
10 variant: model.belongsTo(() => ProductVariant, {
11 mappedBy: "images",
12 }),
13 image: model.belongsTo(() => ProductImage, {
14 mappedBy: "variants",
15 }),
16 })
17
18 export default ProductVariantProductImage