fix: Product type tax overrides (#9951)

* fix: Make product type tax override work

* fix: Make product type tax override work
This commit is contained in:
Oli Juhl
2024-11-06 20:33:40 +01:00
committed by GitHub
parent aa78fbf546
commit 505768dd9f
35 changed files with 479 additions and 309 deletions

View File

@@ -36,6 +36,13 @@ const ProductIdIndex = createPsqlIndexStatementHelper({
where: "deleted_at IS NOT NULL",
})
const ProductTypeIdIndex = createPsqlIndexStatementHelper({
name: "IDX_line_item_product_type_id",
tableName: "order_line_item",
columns: "product_type_id",
where: "deleted_at IS NOT NULL AND product_type_id IS NOT NULL",
}).MikroORMIndex
const VariantIdIndex = createPsqlIndexStatementHelper({
tableName: "order_line_item",
columns: "variant_id",
@@ -85,6 +92,10 @@ export default class OrderLineItem {
@Property({ columnType: "text", nullable: true })
product_type: string | null = null
@ProductTypeIdIndex()
@Property({ columnType: "text", nullable: true })
product_type_id: string | null = null
@Property({ columnType: "text", nullable: true })
product_collection: string | null = null