This commit is contained in:
meusinfirmary
2025-07-26 03:17:05 +07:00
parent c043a46675
commit 9b14617f7b
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,83 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinTable } from "typeorm";
import { RemitTransaction } from "./remit_transactions";
@Entity("remit_transaction_risk", { schema: "remits" })
export class RemitTransactionRisk {
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({
nullable: false,
unique: true,
length: 256,
})
code: string;
@Column({
nullable: false,
unique: true,
length: 256,
})
reference: string;
@ManyToOne(() => RemitTransaction, { onDelete: "RESTRICT" })
@JoinTable()
transaction: RemitTransaction;
@Column({
nullable: true,
length: 256,
})
category: String;
@Column({
nullable: true,
length: 256,
})
name: String;
@Column({
nullable: true,
length: 256,
})
ref_table: String;
@Column({
nullable: true,
length: 256,
})
ref_id: String;
@Column({
nullable: true,
length: 256,
})
ref_name: String;
@Column({
nullable: false,
type: "int2",
})
ref_value: Number;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true, length: 256 })
created_by: string;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true, length: 256 })
updated_by: string;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
@Column({ nullable: true, length: 256 })
deleted_by: string;
}

View File

@ -119,6 +119,12 @@ export class RemitTransaction {
})
callback_count: Number;
@Column({
nullable: false,
type: "int2",
})
risk_score: Number;
@Column({ nullable: true })
callback_at: Date;

View File

@ -123,6 +123,7 @@ import { RemitIndoProvince } from "./entity/remit_indo_provinces";
import { RemitIndoCity } from "./entity/remit_indo_cities";
import { RemitPartnerCallback } from "./entity/remit_partner_callbacks";
import { RemitTransactionPartnerCallbackLog } from "./entity/remit_transaction_partner_callback_logs";
import { RemitTransactionRisk } from "./entity/remit_transaction_risk";
import {
RemitPartnerType, //
@ -422,6 +423,7 @@ export {
RemitSender,
RemitSenderIdentity,
RemitTransaction,
RemitTransactionRisk,
RemitIndoProvince,
RemitIndoCity,
RemitPartnerCallback,