fix(order): searchable fields (#9493)

FIXES: TRI-353
This commit is contained in:
Carlos R. L. Rodrigues
2024-10-07 14:45:20 -03:00
committed by GitHub
parent dc9c23be34
commit 8fbef8a667
6 changed files with 45 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
import { DAL } from "@medusajs/framework/types"
import {
OrderStatus,
Searchable,
createPsqlIndexStatementHelper,
generateEntityId,
} from "@medusajs/framework/utils"
@@ -90,6 +91,7 @@ export default class Order {
@PrimaryKey({ columnType: "text" })
id: string
@Searchable()
@Property({ autoincrement: true, primary: false })
@DisplayIdIndex.MikroORMIndex()
display_id: number
@@ -130,6 +132,7 @@ export default class Order {
@IsDraftOrderIndex.MikroORMIndex()
is_draft_order: boolean = false
@Searchable()
@Property({ columnType: "text", nullable: true })
email: string | null = null