Raw
1 import { model } from "@medusajs/framework/utils"
2 import StockLocationAddress from "./stock-location-address"
3
4 const StockLocation = model.define("StockLocation", {
5 id: model.id({ prefix: "sloc" }).primaryKey(),
6 name: model.text().searchable(),
7 metadata: model.json().nullable(),
8 address: model
9 .belongsTo(() => StockLocationAddress, {
10 mappedBy: "stock_locations",
11 })
12 .searchable()
13 .nullable(),
14 })
15
16 export default StockLocation