feat: define link util (#7931)
* feat: define link util * handle pluralized fieldAlias for isList * serviceName ar reference * finalize * todo * WIP * finalize * fix tests * update typings * fix Module * linkable * update errors
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { model } from "@medusajs/utils"
|
||||
import Region from "./region"
|
||||
|
||||
const Country = model
|
||||
export default model
|
||||
.define(
|
||||
{ name: "Country", tableName: "region_country" },
|
||||
{
|
||||
@@ -24,5 +24,3 @@ const Country = model
|
||||
unique: true,
|
||||
},
|
||||
])
|
||||
|
||||
export default Country
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
export { default as RegionCountry } from "./country"
|
||||
export { default as Country } from "./country"
|
||||
export { default as Region } from "./region"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { model } from "@medusajs/utils"
|
||||
import RegionCountry from "./country"
|
||||
|
||||
const Region = model.define("region", {
|
||||
export default model.define("region", {
|
||||
id: model.id({ prefix: "reg" }).primaryKey(),
|
||||
name: model.text().searchable(),
|
||||
currency_code: model.text().searchable(),
|
||||
@@ -9,5 +9,3 @@ const Region = model.define("region", {
|
||||
countries: model.hasMany(() => RegionCountry),
|
||||
metadata: model.json().nullable(),
|
||||
})
|
||||
|
||||
export default Region
|
||||
|
||||
Reference in New Issue
Block a user