* feat: add view_configurations feature flag - Add feature flag provider and hooks to admin dashboard - Add backend API endpoint for feature flags - Create view_configurations feature flag (disabled by default) - Update order list table to use legacy version when flag is disabled - Can be enabled with MEDUSA_FF_VIEW_CONFIGURATIONS=true env var * fix: naming * fix: feature flags unauthenticated * fix: add test * feat: add settings module * fix: deps * fix: cleanup * fix: add more tetsts * fix: rm changelog * fix: deps * fix: add settings module to default modules list * fix: pr comments * fix: deps,build * fix: alias * fix: tests * fix: update snapshots
19 lines
382 B
TypeScript
19 lines
382 B
TypeScript
import { model } from "@medusajs/framework/utils"
|
|
|
|
export const UserPreference = model
|
|
.define("user_preference", {
|
|
id: model.id({ prefix: "usrpref" }).primaryKey(),
|
|
user_id: model.text(),
|
|
key: model.text().searchable(),
|
|
value: model.json(),
|
|
})
|
|
.indexes([
|
|
{
|
|
on: ["user_id", "key"],
|
|
unique: true,
|
|
},
|
|
{
|
|
on: ["user_id"],
|
|
},
|
|
])
|