feat(cart): Public-facing DTOs + (partial) module interface (#6000)
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
OnInit,
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from "@mikro-orm/core"
|
||||
@@ -22,6 +23,8 @@ type OptionalCartProps =
|
||||
|
||||
@Entity({ tableName: "cart" })
|
||||
export default class Cart {
|
||||
[OptionalProps]?: OptionalCartProps
|
||||
|
||||
@PrimaryKey({ columnType: "text" })
|
||||
id: string
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export { default as Address } from "./address"
|
||||
export { default as AdjustmentLine } from "./adjustment-line"
|
||||
export { default as Cart } from "./cart"
|
||||
export { default as LineItem } from "./line-item"
|
||||
export { default as LineItemAdjustmentLine } from "./line-item-adjustment-line"
|
||||
@@ -7,5 +6,3 @@ export { default as LineItemTaxLine } from "./line-item-tax-line"
|
||||
export { default as ShippingMethod } from "./shipping-method"
|
||||
export { default as ShippingMethodAdjustmentLine } from "./shipping-method-adjustment-line"
|
||||
export { default as ShippingMethodTaxLine } from "./shipping-method-tax-line"
|
||||
export { default as TaxLine } from "./tax-line"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
OneToMany,
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property
|
||||
Property,
|
||||
} from "@mikro-orm/core"
|
||||
import Cart from "./cart"
|
||||
import LineItemAdjustmentLine from "./line-item-adjustment-line"
|
||||
|
||||
@@ -28,7 +28,7 @@ export default class ShippingMethod {
|
||||
cart: Cart
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
title: string
|
||||
name: string
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
description?: string | null
|
||||
@@ -38,7 +38,7 @@ export default class ShippingMethod {
|
||||
amount: number
|
||||
|
||||
@Property({ columnType: "boolean" })
|
||||
tax_inclusive = false
|
||||
is_tax_inclusive = false
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
shipping_option_id?: string | null
|
||||
|
||||
Reference in New Issue
Block a user