This commit is contained in:
2026-01-14 11:29:24 +03:30
parent 1075dbc44f
commit 4ab9de447a
26 changed files with 1130 additions and 1710 deletions
@@ -1,4 +1,4 @@
import { Entity, Enum, Index, ManyToOne, Property } from '@mikro-orm/core';
import { Entity, Enum, Index, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Order } from './order.entity';
import { Product } from 'src/modules/product/entities/product.entity';
@@ -8,6 +8,9 @@ import { OrderItemStatus } from '../interface/order.interface';
@Index({ properties: ['order'] })
@Index({ properties: ['product'] })
export class OrderItem extends BaseEntity {
@PrimaryKey({ type: 'bigint', autoincrement: true })
id: bigint
@ManyToOne(() => Order)
order!: Order;