populate order with payments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Entity, ManyToOne, Property, Enum } from '@mikro-orm/core';
|
||||
import { Entity, ManyToOne, Property, Enum, Index } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Order } from '../../orders/entities/order.entity';
|
||||
import { PaymentGatewayEnum, PaymentMethodEnum, PaymentStatusEnum } from '../interface/payment';
|
||||
@@ -6,6 +6,7 @@ import { PaymentGatewayEnum, PaymentMethodEnum, PaymentStatusEnum } from '../int
|
||||
@Entity({ tableName: 'payments' })
|
||||
export class Payment extends BaseEntity {
|
||||
@ManyToOne(() => Order)
|
||||
@Index()
|
||||
order!: Order;
|
||||
|
||||
@Property({ type: 'decimal', precision: 10, scale: 0 })
|
||||
|
||||
Reference in New Issue
Block a user