* 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
23 lines
550 B
TypeScript
23 lines
550 B
TypeScript
import { model } from "@medusajs/framework/utils"
|
|
|
|
export const ViewConfiguration = model
|
|
.define("view_configuration", {
|
|
id: model.id({ prefix: "vconf" }).primaryKey(),
|
|
entity: model.text().searchable(),
|
|
name: model.text().searchable().nullable(),
|
|
user_id: model.text().nullable(),
|
|
is_system_default: model.boolean().default(false),
|
|
configuration: model.json(),
|
|
})
|
|
.indexes([
|
|
{
|
|
on: ["entity", "user_id"],
|
|
},
|
|
{
|
|
on: ["entity", "is_system_default"],
|
|
},
|
|
{
|
|
on: ["user_id"],
|
|
},
|
|
])
|