|
1
|
import { model } from "@medusajs/framework/utils" |
|
2
|
|
|
3
|
export const ViewConfiguration = model |
|
4
|
.define("view_configuration", { |
|
5
|
id: model.id({ prefix: "vconf" }).primaryKey(), |
|
6
|
entity: model.text().searchable(), |
|
7
|
name: model.text().searchable().nullable(), |
|
8
|
user_id: model.text().nullable(), |
|
9
|
is_system_default: model.boolean().default(false), |
|
10
|
configuration: model.json(), |
|
11
|
}) |
|
12
|
.indexes([ |
|
13
|
{ |
|
14
|
on: ["entity", "user_id"], |
|
15
|
}, |
|
16
|
{ |
|
17
|
on: ["entity", "is_system_default"], |
|
18
|
}, |
|
19
|
{ |
|
20
|
on: ["user_id"], |
|
21
|
}, |
|
22
|
]) |