chore(medusa): Typeorm upgrade to 0.3.11 (#3041)
This commit is contained in:
1 parent
8137061908
commit
121b42acfe
275 files changed
+4493
-4780
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
JoinTable,
|
||||
ManyToMany,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
Unique,
|
||||
} from "typeorm"
|
||||
|
||||
@@ -19,6 +20,7 @@ import { ProductTag } from "./product-tag"
|
||||
import { ProductType } from "./product-type"
|
||||
import { SoftDeletableEntity } from "../interfaces/models/soft-deletable-entity"
|
||||
import { generateEntityId } from "../utils/generate-entity-id"
|
||||
import { Discount } from "./discount"
|
||||
|
||||
export enum DiscountConditionType {
|
||||
PRODUCTS = "products",
|
||||
|
||||
@@ -118,7 +118,7 @@ export class LineItem extends BaseEntity {
|
||||
@Column({ nullable: true, type: "text" })
|
||||
variant_id: string | null
|
||||
|
||||
@ManyToOne(() => ProductVariant, { eager: true })
|
||||
@ManyToOne(() => ProductVariant)
|
||||
@JoinColumn({ name: "variant_id" })
|
||||
variant: ProductVariant
|
||||
|
||||
|
||||
@@ -11,15 +11,8 @@ import {
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
} from "typeorm"
|
||||
import {
|
||||
DbAwareColumn,
|
||||
resolveDbGenerationStrategy,
|
||||
resolveDbType,
|
||||
} from "../utils/db-aware-column"
|
||||
import {
|
||||
FeatureFlagColumn,
|
||||
FeatureFlagDecorators,
|
||||
} from "../utils/feature-flag-decorators"
|
||||
import { DbAwareColumn, resolveDbGenerationStrategy, resolveDbType, } from "../utils/db-aware-column"
|
||||
import { FeatureFlagColumn, FeatureFlagDecorators, } from "../utils/feature-flag-decorators"
|
||||
|
||||
import { BaseEntity } from "../interfaces/models/base-entity"
|
||||
import { generateEntityId } from "../utils/generate-entity-id"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import { DbAwareColumn, generateEntityId } from "../utils"
|
||||
import { MoneyAmount } from "./money-amount"
|
||||
import { Product } from "./product"
|
||||
import { ProductOptionValue } from "./product-option-value"
|
||||
import { SoftDeletableEntity } from "../interfaces"
|
||||
import {
|
||||
BeforeInsert,
|
||||
Column,
|
||||
@@ -5,15 +10,9 @@ import {
|
||||
Index,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
OneToMany
|
||||
} from "typeorm"
|
||||
|
||||
import { DbAwareColumn } from "../utils/db-aware-column"
|
||||
import { MoneyAmount } from "./money-amount"
|
||||
import { Product } from "./product"
|
||||
import { ProductOptionValue } from "./product-option-value"
|
||||
import { SoftDeletableEntity } from "../interfaces/models/soft-deletable-entity"
|
||||
import { generateEntityId } from "../utils/generate-entity-id"
|
||||
import { ProductVariantInventoryItem } from "./product-variant-inventory-item"
|
||||
|
||||
@Entity()
|
||||
@@ -25,7 +24,7 @@ export class ProductVariant extends SoftDeletableEntity {
|
||||
@Column()
|
||||
product_id: string
|
||||
|
||||
@ManyToOne(() => Product, (product) => product.variants, { eager: true })
|
||||
@ManyToOne(() => Product, (product) => product.variants)
|
||||
@JoinColumn({ name: "product_id" })
|
||||
product: Product
|
||||
|
||||
@@ -51,7 +50,7 @@ export class ProductVariant extends SoftDeletableEntity {
|
||||
@Index({ unique: true, where: "deleted_at IS NULL" })
|
||||
upc: string
|
||||
|
||||
@Column({ nullable: true, default: 0, select: false })
|
||||
@Column({ nullable: true, default: 0 })
|
||||
variant_rank: number
|
||||
|
||||
@Column({ type: "int" })
|
||||
|
||||
Reference in new issue
Block a user