74 lines
1.3 KiB
TypeScript
74 lines
1.3 KiB
TypeScript
import { Column, Entity, ManyToOne } from 'typeorm';
|
|
import { BaseModel } from '../../config/basemodel.entity';
|
|
import { statusTransaction, typeTransaction } from '../../helper/enum-list';
|
|
import { ProductHistoryPrice } from '../../product/entities/product-history-price.entity';
|
|
import { UserDetail } from '../../users/entities/user_detail.entity';
|
|
import { TransactionJournal } from './transaction-journal.entity';
|
|
|
|
@Entity()
|
|
export class Transactions extends BaseModel {
|
|
@Column()
|
|
amount: number;
|
|
|
|
@Column()
|
|
status: statusTransaction;
|
|
|
|
@Column()
|
|
type: typeTransaction;
|
|
|
|
@Column({
|
|
type: 'uuid',
|
|
nullable: true,
|
|
})
|
|
user: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
user_destination: string;
|
|
|
|
@ManyToOne(() => ProductHistoryPrice, (product) => product.id)
|
|
product_price: ProductHistoryPrice;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
image_prove: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
destination: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
supplier_trx_id: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
partner_trx_id: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
seri_number: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
request_json: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
})
|
|
callback_json: string;
|
|
|
|
mark_up_price: number;
|
|
|
|
userData: UserDetail;
|
|
|
|
transactionJournal: TransactionJournal;
|
|
}
|