|
1
|
import { Modules } from "@medusajs/utils" |
|
2
|
|
|
3
|
export const defaultSchema = ` |
|
4
|
type Product @Listeners(values: ["${Modules.PRODUCT}.product.created", "${Modules.PRODUCT}.product.updated", "${Modules.PRODUCT}.product.deleted", "${Modules.PRODUCT}.product.restored"]) { |
|
5
|
id: ID |
|
6
|
title: String |
|
7
|
handle: String |
|
8
|
status: String |
|
9
|
type_id: String |
|
10
|
collection_id: String |
|
11
|
is_giftcard: Boolean |
|
12
|
external_id: String |
|
13
|
created_at: DateTime |
|
14
|
updated_at: DateTime |
|
15
|
|
|
16
|
variants: [ProductVariant] |
|
17
|
sales_channels: [SalesChannel] |
|
18
|
} |
|
19
|
|
|
20
|
type ProductVariant @Listeners(values: ["${Modules.PRODUCT}.product-variant.created", "${Modules.PRODUCT}.product-variant.updated", "${Modules.PRODUCT}.product-variant.deleted", "${Modules.PRODUCT}.product-variant.restored"]) { |
|
21
|
id: ID |
|
22
|
product_id: String |
|
23
|
sku: String |
|
24
|
|
|
25
|
prices: [Price] |
|
26
|
} |
|
27
|
|
|
28
|
type Price @Listeners(values: ["${Modules.PRICING}.price.created", "${Modules.PRICING}.price.updated", "${Modules.PRICING}.price.deleted", "${Modules.PRICING}.price.restored"]) { |
|
29
|
id: ID |
|
30
|
amount: Float |
|
31
|
currency_code: String |
|
32
|
price_list_id: String |
|
33
|
} |
|
34
|
|
|
35
|
type SalesChannel @Listeners(values: ["${Modules.SALES_CHANNEL}.sales-channel.created", "${Modules.SALES_CHANNEL}.sales-channel.updated", "${Modules.SALES_CHANNEL}.sales-channel.deleted", "${Modules.SALES_CHANNEL}.sales-channel.restored"]) { |
|
36
|
id: ID |
|
37
|
is_disabled: Boolean |
|
38
|
} |
|
39
|
` |