chore: move to swc/jest (#7739)
* chore: move to swc * chore: fix tax rate tests * chore: undo failed test * chore: fix unit tests script * chore: use node 20 * Update scripts/run-workspace-unit-tests-in-chunks.sh
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import ClaimItem from "./claim-item"
|
||||
|
||||
@@ -47,7 +48,7 @@ export default class ClaimItemImage {
|
||||
@ManyToOne(() => ClaimItem, {
|
||||
persist: false,
|
||||
})
|
||||
item: ClaimItem
|
||||
item: Rel<ClaimItem>
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
url: string
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import Claim from "./claim"
|
||||
import ClaimItemImage from "./claim-item-image"
|
||||
@@ -52,10 +53,10 @@ export default class OrderClaimItem {
|
||||
@OneToMany(() => ClaimItemImage, (ci) => ci.item, {
|
||||
cascade: [Cascade.PERSIST, Cascade.REMOVE],
|
||||
})
|
||||
images = new Collection<ClaimItemImage>(this)
|
||||
images = new Collection<Rel<ClaimItemImage>>(this)
|
||||
|
||||
@Enum({ items: () => ClaimReason, nullable: true })
|
||||
reason: ClaimReason | null = null
|
||||
reason: Rel<ClaimReason> | null = null
|
||||
|
||||
@MikroOrmBigNumberProperty()
|
||||
quantity: Number | number
|
||||
@@ -75,7 +76,7 @@ export default class OrderClaimItem {
|
||||
@ManyToOne(() => Claim, {
|
||||
persist: false,
|
||||
})
|
||||
claim: Claim
|
||||
claim: Rel<Claim>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => LineItem,
|
||||
@@ -89,7 +90,7 @@ export default class OrderClaimItem {
|
||||
@ManyToOne(() => LineItem, {
|
||||
persist: false,
|
||||
})
|
||||
item: LineItem
|
||||
item: Rel<LineItem>
|
||||
|
||||
@Property({ columnType: "boolean", default: false })
|
||||
is_additional_item: boolean = false
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import ClaimItem from "./claim-item"
|
||||
import Order from "./order"
|
||||
@@ -71,7 +72,7 @@ export default class OrderClaim {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@OneToOne({
|
||||
entity: () => Return,
|
||||
@@ -81,7 +82,7 @@ export default class OrderClaim {
|
||||
nullable: true,
|
||||
owner: true,
|
||||
})
|
||||
return: Return
|
||||
return: Rel<Return>
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
@ReturnIdIndex.MikroORMIndex()
|
||||
@@ -97,7 +98,7 @@ export default class OrderClaim {
|
||||
display_id: number
|
||||
|
||||
@Enum({ items: () => ClaimType })
|
||||
type: ClaimType
|
||||
type: Rel<ClaimType>
|
||||
|
||||
@Property({ columnType: "boolean", nullable: true })
|
||||
no_notification: boolean | null = null
|
||||
@@ -113,12 +114,12 @@ export default class OrderClaim {
|
||||
@OneToMany(() => ClaimItem, (item) => item.claim, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
additional_items = new Collection<ClaimItem>(this)
|
||||
additional_items = new Collection<Rel<ClaimItem>>(this)
|
||||
|
||||
@OneToMany(() => ClaimItem, (item) => item.claim, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
claim_items = new Collection<ClaimItem>(this)
|
||||
claim_items = new Collection<Rel<ClaimItem>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => OrderShippingMethod,
|
||||
@@ -127,7 +128,7 @@ export default class OrderClaim {
|
||||
cascade: [Cascade.PERSIST],
|
||||
}
|
||||
)
|
||||
shipping_methods = new Collection<OrderShippingMethod>(this)
|
||||
shipping_methods = new Collection<Rel<OrderShippingMethod>>(this)
|
||||
|
||||
@OneToMany(() => Transaction, (transaction) => transaction.claim, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import { ExchangeItem, Transaction } from "@models"
|
||||
import Order from "./order"
|
||||
@@ -68,7 +69,7 @@ export default class OrderExchange {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@OneToOne({
|
||||
entity: () => Return,
|
||||
@@ -78,7 +79,7 @@ export default class OrderExchange {
|
||||
nullable: true,
|
||||
owner: true,
|
||||
})
|
||||
return: Return
|
||||
return: Rel<Return>
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
@ReturnIdIndex.MikroORMIndex()
|
||||
@@ -110,7 +111,7 @@ export default class OrderExchange {
|
||||
@OneToMany(() => ExchangeItem, (item) => item.exchange, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
additional_items = new Collection<ExchangeItem>(this)
|
||||
additional_items = new Collection<Rel<ExchangeItem>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => OrderShippingMethod,
|
||||
@@ -119,7 +120,7 @@ export default class OrderExchange {
|
||||
cascade: [Cascade.PERSIST],
|
||||
}
|
||||
)
|
||||
shipping_methods = new Collection<OrderShippingMethod>(this)
|
||||
shipping_methods = new Collection<Rel<OrderShippingMethod>>(this)
|
||||
|
||||
@OneToMany(() => Transaction, (transaction) => transaction.exchange, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit } from "@mikro-orm/core"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core"
|
||||
import AdjustmentLine from "./adjustment-line"
|
||||
import LineItem from "./line-item"
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class LineItemAdjustment extends AdjustmentLine {
|
||||
@ManyToOne(() => LineItem, {
|
||||
persist: false,
|
||||
})
|
||||
item: LineItem
|
||||
item: Rel<LineItem>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => LineItem,
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Entity,
|
||||
ManyToOne,
|
||||
OnInit,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import LineItem from "./line-item"
|
||||
import TaxLine from "./tax-line"
|
||||
@@ -23,7 +24,7 @@ export default class LineItemTaxLine extends TaxLine {
|
||||
fieldName: "item_id",
|
||||
persist: false,
|
||||
})
|
||||
item: LineItem
|
||||
item: Rel<LineItem>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => LineItem,
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import LineItemAdjustment from "./line-item-adjustment"
|
||||
import LineItemTaxLine from "./line-item-tax-line"
|
||||
@@ -92,13 +93,13 @@ export default class LineItem {
|
||||
variant_option_values: Record<string, unknown> | null = null
|
||||
|
||||
@Property({ columnType: "boolean" })
|
||||
requires_shipping = true
|
||||
requires_shipping: boolean = true
|
||||
|
||||
@Property({ columnType: "boolean" })
|
||||
is_discountable = true
|
||||
is_discountable: boolean = true
|
||||
|
||||
@Property({ columnType: "boolean" })
|
||||
is_tax_inclusive = false
|
||||
is_tax_inclusive: boolean = false
|
||||
|
||||
@MikroOrmBigNumberProperty({
|
||||
nullable: true,
|
||||
@@ -119,12 +120,12 @@ export default class LineItem {
|
||||
@OneToMany(() => LineItemTaxLine, (taxLine) => taxLine.item, {
|
||||
cascade: [Cascade.PERSIST, "soft-remove" as Cascade],
|
||||
})
|
||||
tax_lines = new Collection<LineItemTaxLine>(this)
|
||||
tax_lines = new Collection<Rel<LineItemTaxLine>>(this)
|
||||
|
||||
@OneToMany(() => LineItemAdjustment, (adjustment) => adjustment.item, {
|
||||
cascade: [Cascade.PERSIST, "soft-remove" as Cascade],
|
||||
})
|
||||
adjustments = new Collection<LineItemAdjustment>(this)
|
||||
adjustments = new Collection<Rel<LineItemAdjustment>>(this)
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
metadata: Record<string, unknown> | null = null
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import OrderClaim from "./claim"
|
||||
import OrderExchange from "./exchange"
|
||||
@@ -90,7 +91,7 @@ export default class OrderChangeAction {
|
||||
persist: false,
|
||||
nullable: true,
|
||||
})
|
||||
order: Order | null = null
|
||||
order: Rel<Order> | null = null
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Return,
|
||||
@@ -155,7 +156,7 @@ export default class OrderChangeAction {
|
||||
persist: false,
|
||||
nullable: true,
|
||||
})
|
||||
order_change: OrderChange | null = null
|
||||
order_change: Rel<OrderChange> | null = null
|
||||
|
||||
@Property({
|
||||
columnType: "text",
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import { OrderChangeStatus, OrderChangeType } from "@types"
|
||||
import OrderClaim from "./claim"
|
||||
@@ -94,7 +95,7 @@ export default class OrderChange {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Return,
|
||||
@@ -109,7 +110,7 @@ export default class OrderChange {
|
||||
@ManyToOne(() => Return, {
|
||||
persist: false,
|
||||
})
|
||||
return: Return
|
||||
return: Rel<Return>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => OrderClaim,
|
||||
@@ -152,7 +153,7 @@ export default class OrderChange {
|
||||
@OneToMany(() => OrderChangeAction, (action) => action.order_change, {
|
||||
cascade: [Cascade.PERSIST, "sotf-remove" as Cascade],
|
||||
})
|
||||
actions = new Collection<OrderChangeAction>(this)
|
||||
actions = new Collection<Rel<OrderChangeAction>>(this)
|
||||
|
||||
@Property({
|
||||
columnType: "text",
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import LineItem from "./line-item"
|
||||
import Order from "./order"
|
||||
@@ -62,7 +63,7 @@ export default class OrderItem {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@Property({ columnType: "integer" })
|
||||
@OrderVersionIndex.MikroORMIndex()
|
||||
@@ -80,7 +81,7 @@ export default class OrderItem {
|
||||
@ManyToOne(() => LineItem, {
|
||||
persist: false,
|
||||
})
|
||||
item: LineItem
|
||||
item: Rel<LineItem>
|
||||
|
||||
@MikroOrmBigNumberProperty()
|
||||
quantity: BigNumber | number
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import Claim from "./claim"
|
||||
import Exchange from "./exchange"
|
||||
@@ -81,7 +82,7 @@ export default class OrderShippingMethod {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Return,
|
||||
@@ -96,7 +97,7 @@ export default class OrderShippingMethod {
|
||||
@ManyToOne(() => Return, {
|
||||
persist: false,
|
||||
})
|
||||
return: Return
|
||||
return: Rel<Return>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Exchange,
|
||||
@@ -111,7 +112,7 @@ export default class OrderShippingMethod {
|
||||
@ManyToOne(() => Exchange, {
|
||||
persist: false,
|
||||
})
|
||||
exchange: Exchange
|
||||
exchange: Rel<Exchange>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Claim,
|
||||
@@ -126,7 +127,7 @@ export default class OrderShippingMethod {
|
||||
@ManyToOne(() => Claim, {
|
||||
persist: false,
|
||||
})
|
||||
claim: Claim
|
||||
claim: Rel<Claim>
|
||||
|
||||
@Property({ columnType: "integer" })
|
||||
@OrderVersionIndex.MikroORMIndex()
|
||||
@@ -144,7 +145,7 @@ export default class OrderShippingMethod {
|
||||
@ManyToOne(() => ShippingMethod, {
|
||||
persist: false,
|
||||
})
|
||||
shipping_method: ShippingMethod
|
||||
shipping_method: Rel<ShippingMethod>
|
||||
|
||||
@Property({
|
||||
onCreate: () => new Date(),
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
OnInit,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import Order from "./order"
|
||||
|
||||
@@ -71,7 +72,7 @@ export default class OrderSummary {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@Property({
|
||||
columnType: "integer",
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import Address from "./address"
|
||||
import OrderItem from "./order-item"
|
||||
@@ -127,7 +128,7 @@ export default class Order {
|
||||
columnType: "boolean",
|
||||
})
|
||||
@IsDraftOrderIndex.MikroORMIndex()
|
||||
is_draft_order = false
|
||||
is_draft_order: boolean = false
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
email: string | null = null
|
||||
@@ -146,7 +147,7 @@ export default class Order {
|
||||
nullable: true,
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
shipping_address?: Address | null
|
||||
shipping_address?: Rel<Address> | null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
@BillingAddressIdIndex.MikroORMIndex()
|
||||
@@ -158,7 +159,7 @@ export default class Order {
|
||||
nullable: true,
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
billing_address?: Address | null
|
||||
billing_address?: Rel<Address> | null
|
||||
|
||||
@Property({ columnType: "boolean", nullable: true })
|
||||
no_notification: boolean | null = null
|
||||
@@ -166,7 +167,7 @@ export default class Order {
|
||||
@OneToMany(() => OrderSummary, (summary) => summary.order, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
summary = new Collection<OrderSummary>(this)
|
||||
summary = new Collection<Rel<OrderSummary>>(this)
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
metadata: Record<string, unknown> | null = null
|
||||
@@ -174,7 +175,7 @@ export default class Order {
|
||||
@OneToMany(() => OrderItem, (itemDetail) => itemDetail.order, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
items = new Collection<OrderItem>(this)
|
||||
items = new Collection<Rel<OrderItem>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => OrderShippingMethod,
|
||||
@@ -183,12 +184,12 @@ export default class Order {
|
||||
cascade: [Cascade.PERSIST],
|
||||
}
|
||||
)
|
||||
shipping_methods = new Collection<OrderShippingMethod>(this)
|
||||
shipping_methods = new Collection<Rel<OrderShippingMethod>>(this)
|
||||
|
||||
@OneToMany(() => Transaction, (transaction) => transaction.order, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
transactions = new Collection<Transaction>(this)
|
||||
transactions = new Collection<Rel<Transaction>>(this)
|
||||
|
||||
@Property({
|
||||
onCreate: () => new Date(),
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
|
||||
const DeletedAtIndex = createPsqlIndexStatementHelper({
|
||||
@@ -62,14 +63,14 @@ export default class ReturnReason {
|
||||
nullable: true,
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
parent_return_reason?: ReturnReason | null
|
||||
parent_return_reason?: Rel<ReturnReason> | null
|
||||
|
||||
@OneToMany(
|
||||
() => ReturnReason,
|
||||
(return_reason) => return_reason.parent_return_reason,
|
||||
{ cascade: [Cascade.PERSIST] }
|
||||
)
|
||||
return_reason_children: ReturnReason[]
|
||||
return_reason_children: Rel<ReturnReason>[]
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
metadata: Record<string, unknown> | null = null
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import { ReturnItem, Transaction } from "@models"
|
||||
import Claim from "./claim"
|
||||
@@ -78,7 +79,7 @@ export default class Return {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@OneToOne({
|
||||
entity: () => Exchange,
|
||||
@@ -86,7 +87,7 @@ export default class Return {
|
||||
fieldName: "exchange_id",
|
||||
nullable: true,
|
||||
})
|
||||
exchange: Exchange
|
||||
exchange: Rel<Exchange>
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
@ExchangeIdIndex.MikroORMIndex()
|
||||
@@ -98,7 +99,7 @@ export default class Return {
|
||||
fieldName: "claim_id",
|
||||
nullable: true,
|
||||
})
|
||||
claim: Claim
|
||||
claim: Rel<Claim>
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
@ClaimIdIndex.MikroORMIndex()
|
||||
@@ -130,7 +131,7 @@ export default class Return {
|
||||
@OneToMany(() => ReturnItem, (itemDetail) => itemDetail.return, {
|
||||
cascade: [Cascade.PERSIST],
|
||||
})
|
||||
items = new Collection<OrderItem>(this)
|
||||
items = new Collection<Rel<OrderItem>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => OrderShippingMethod,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit } from "@mikro-orm/core"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core"
|
||||
import AdjustmentLine from "./adjustment-line"
|
||||
import ShippingMethod from "./shipping-method"
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class ShippingMethodAdjustment extends AdjustmentLine {
|
||||
@ManyToOne(() => ShippingMethod, {
|
||||
persist: false,
|
||||
})
|
||||
shipping_method: ShippingMethod
|
||||
shipping_method: Rel<ShippingMethod>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => ShippingMethod,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit } from "@mikro-orm/core"
|
||||
import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core"
|
||||
import ShippingMethod from "./shipping-method"
|
||||
import TaxLine from "./tax-line"
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class ShippingMethodTaxLine extends TaxLine {
|
||||
@ManyToOne(() => ShippingMethod, {
|
||||
persist: false,
|
||||
})
|
||||
shipping_method: ShippingMethod
|
||||
shipping_method: Rel<ShippingMethod>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => ShippingMethod,
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
OnInit,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import ShippingMethodAdjustment from "./shipping-method-adjustment"
|
||||
import ShippingMethodTaxLine from "./shipping-method-tax-line"
|
||||
@@ -41,7 +42,7 @@ export default class ShippingMethod {
|
||||
raw_amount: BigNumberRawValue
|
||||
|
||||
@Property({ columnType: "boolean" })
|
||||
is_tax_inclusive = false
|
||||
is_tax_inclusive: boolean = false
|
||||
|
||||
@Property({
|
||||
columnType: "text",
|
||||
@@ -63,7 +64,7 @@ export default class ShippingMethod {
|
||||
cascade: [Cascade.PERSIST],
|
||||
}
|
||||
)
|
||||
tax_lines = new Collection<ShippingMethodTaxLine>(this)
|
||||
tax_lines = new Collection<Rel<ShippingMethodTaxLine>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => ShippingMethodAdjustment,
|
||||
@@ -72,7 +73,7 @@ export default class ShippingMethod {
|
||||
cascade: [Cascade.PERSIST],
|
||||
}
|
||||
)
|
||||
adjustments = new Collection<ShippingMethodAdjustment>(this)
|
||||
adjustments = new Collection<Rel<ShippingMethodAdjustment>>(this)
|
||||
|
||||
@Property({
|
||||
onCreate: () => new Date(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigNumberRawValue } from "@medusajs/types"
|
||||
import {BigNumber, MikroOrmBigNumberProperty} from "@medusajs/utils"
|
||||
import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/utils"
|
||||
import { PrimaryKey, Property } from "@mikro-orm/core"
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import Claim from "./claim"
|
||||
import Exchange from "./exchange"
|
||||
@@ -90,7 +91,7 @@ export default class Transaction {
|
||||
@ManyToOne(() => Order, {
|
||||
persist: false,
|
||||
})
|
||||
order: Order
|
||||
order: Rel<Order>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Return,
|
||||
@@ -105,7 +106,7 @@ export default class Transaction {
|
||||
@ManyToOne(() => Return, {
|
||||
persist: false,
|
||||
})
|
||||
return: Return
|
||||
return: Rel<Return>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Exchange,
|
||||
@@ -120,7 +121,7 @@ export default class Transaction {
|
||||
@ManyToOne(() => Exchange, {
|
||||
persist: false,
|
||||
})
|
||||
exchange: Exchange
|
||||
exchange: Rel<Exchange>
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Claim,
|
||||
@@ -135,7 +136,7 @@ export default class Transaction {
|
||||
@ManyToOne(() => Claim, {
|
||||
persist: false,
|
||||
})
|
||||
claim: Claim
|
||||
claim: Rel<Claim>
|
||||
|
||||
@Property({
|
||||
columnType: "integer",
|
||||
|
||||
Reference in New Issue
Block a user