// Visit http://docs.acme.com for documentation model Product { fields { name Text description Text? imageUrl Text? gtin Text @unique price Number stockLocation ProductStockLocation } actions { get getProduct(id) create createProduct() list listProducts() update updateProduct(id) update updateProductPrice(id) with (price) { @permission(roles: [Admin]) } delete deleteProduct(id) } @permission( actions: [list, create, update, delete], roles: [Staff] ) }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28