Files
medusa-store/packages/modules/store/src/models/currency.ts
T
2024-12-06 17:38:15 +05:30

16 lines
416 B
TypeScript

import { model } from "@medusajs/framework/utils"
import Store from "./store"
const StoreCurrency = model.define("StoreCurrency", {
id: model.id({ prefix: "stocur" }).primaryKey(),
currency_code: model.text().searchable(),
is_default: model.boolean().default(false),
store: model
.belongsTo(() => Store, {
mappedBy: "supported_currencies",
})
.nullable(),
})
export default StoreCurrency