security/codeql-dependabot-gitleaks
| 1 | import { model } from "@medusajs/framework/utils" |
| 2 | |
| 3 | const Locale = model |
| 4 | .define("locale", { |
| 5 | id: model.id({ prefix: "loc" }).primaryKey(), |
| 6 | /** |
| 7 | * The BCP 47 language tag code of the locale (e.g., "en-US", "da-DK"). |
| 8 | */ |
| 9 | code: model.text().searchable(), |
| 10 | /** |
| 11 | * The human-readable name of the locale (e.g., "English (US)", "Danish"). |
| 12 | */ |
| 13 | name: model.text().searchable(), |
| 14 | }) |
| 15 | .indexes([ |
| 16 | { |
| 17 | on: ["code"], |
| 18 | unique: true, |
| 19 | }, |
| 20 | ]) |
| 21 | |
| 22 | export default Locale |