feat(medusa,brightpearl,segment,webshipper): claims (#163)
* chore: create tests * chore: models * fix: passing initial tests * test: adds integration test * test: clean up integration implementation * fix: claims * fix: brightpearl + webshipper * tests: passing * fix: update claim items * fix: adds gitignore * fix: pr comments * fix: single migration * fix(medusa-plugin-segment): adds item claimed event to segment
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from "typeorm"
|
||||
import { ulid } from "ulid"
|
||||
|
||||
import { ClaimOrder } from "./claim-order"
|
||||
import { Order } from "./order"
|
||||
import { Cart } from "./cart"
|
||||
import { Swap } from "./swap"
|
||||
@@ -18,7 +19,7 @@ import { Return } from "./return"
|
||||
import { ShippingOption } from "./shipping-option"
|
||||
|
||||
@Check(
|
||||
`"order_id" IS NOT NULL OR "cart_id" IS NOT NULL OR "swap_id" IS NOT NULL OR "return_id" IS NOT NULL`
|
||||
`"claim_order_id" IS NOT NULL OR "order_id" IS NOT NULL OR "cart_id" IS NOT NULL OR "swap_id" IS NOT NULL OR "return_id" IS NOT NULL`
|
||||
)
|
||||
@Check(`"price" >= 0`)
|
||||
@Entity()
|
||||
@@ -38,6 +39,14 @@ export class ShippingMethod {
|
||||
@JoinColumn({ name: "order_id" })
|
||||
order: Order
|
||||
|
||||
@Index()
|
||||
@Column({ nullable: true })
|
||||
claim_order_id: string
|
||||
|
||||
@ManyToOne(() => ClaimOrder)
|
||||
@JoinColumn({ name: "claim_order_id" })
|
||||
claim_order: ClaimOrder
|
||||
|
||||
@Index()
|
||||
@Column({ nullable: true })
|
||||
cart_id: string
|
||||
|
||||
Reference in New Issue
Block a user