security/codeql-dependabot-gitleaks
| 1 | import { model } from "@medusajs/framework/utils" |
| 2 | import Store from "./store" |
| 3 | |
| 4 | /** |
| 5 | * @since 2.12.3 |
| 6 | */ |
| 7 | const StoreLocale = model.define("StoreLocale", { |
| 8 | id: model.id({ prefix: "stloc" }).primaryKey(), |
| 9 | /** |
| 10 | * The BCP 47 language tag code of the locale. |
| 11 | * |
| 12 | * @example |
| 13 | * "en-US" |
| 14 | */ |
| 15 | locale_code: model.text().searchable(), |
| 16 | store: model |
| 17 | .belongsTo(() => Store, { |
| 18 | mappedBy: "supported_locales", |
| 19 | }) |
| 20 | .nullable(), |
| 21 | }) |
| 22 | |
| 23 | export default StoreLocale |