fixing: get product
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
import { ProductSubCategories } from './product-sub-category.entity';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
import { Supplier } from '../../users/entities/supplier.entity';
|
||||
import { ProductHistoryPrice } from './product-history-price.entity';
|
||||
|
||||
@Entity()
|
||||
export class Product extends BaseModel {
|
||||
@@ -54,4 +55,16 @@ export class Product extends BaseModel {
|
||||
},
|
||||
)
|
||||
supplier: Supplier;
|
||||
|
||||
@OneToMany(
|
||||
() => {
|
||||
return ProductHistoryPrice;
|
||||
},
|
||||
(php) => {
|
||||
return php.product;
|
||||
},
|
||||
)
|
||||
priceHistory: ProductHistoryPrice;
|
||||
|
||||
currentPrice: ProductHistoryPrice;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user