fix: get tranasction history by user

This commit is contained in:
ilham
2021-12-15 15:17:59 +07:00
parent 53575f36d6
commit 8c5e944cc8
5 changed files with 121 additions and 8 deletions

View File

@@ -12,6 +12,8 @@ import {
} from 'typeorm';
import { BaseModel } from '../../config/basemodel.entity';
import { statusTransaction, typeTransaction } from '../../helper/enum-list';
import { Partner } from '../../users/entities/partner.entity';
import { ProductHistoryPrice } from '../../product/entities/product-history-price.entity';
@Entity()
export class Transactions extends BaseModel {
@@ -31,4 +33,9 @@ export class Transactions extends BaseModel {
nullable: true,
})
user_destination: string;
@ManyToOne(() => ProductHistoryPrice, (product) => product.id)
product_price: ProductHistoryPrice;
mark_up_price: number;
}