crud product

This commit is contained in:
2026-01-13 18:19:51 +03:30
parent 984b889587
commit 6522acff5f
27 changed files with 333 additions and 1080 deletions
@@ -1,7 +1,7 @@
import { Entity, Enum, Index, ManyToOne, 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';
import { Product } from 'src/modules/product/entities/product.entity';
import { OrderItemStatus } from '../interface/order.interface';
@Entity({ tableName: 'order_items' })
@@ -11,8 +11,8 @@ export class OrderItem extends BaseEntity {
@ManyToOne(() => Order)
order!: Order;
@ManyToOne(() => product)
product!: product;
@ManyToOne(() => Product)
product!: Product;
@Property({ type: 'int' })
quantity!: number;