This commit is contained in:
fro1991
2025-06-22 13:54:41 +07:00
parent 145fd4a1c0
commit 2fa3c31f80
2 changed files with 21 additions and 3 deletions

7
.prettierrc Normal file
View File

@ -0,0 +1,7 @@
{
"printWidth": 5000,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": true
}

View File

@ -8,6 +8,7 @@ import { RemitBeneficiary } from "./remit_beneficiaries";
import { RemitConfigPurpose } from "./remit_config_purposes";
import { RemitTransactionCurrencyType, RemitTransactionStatus } from "../types/remit";
import { RemitBeneficial } from "./remit_beneficials";
import { RemitConfigRate } from "./remit_config_rates";
@Entity("remit_transactions", { schema: "remits" })
export class RemitTransaction {
@ -56,10 +57,20 @@ export class RemitTransaction {
@Column({
nullable: false,
type: 'float8',
type: "float8",
})
amount: Number;
@ManyToOne(() => RemitConfigRate, { onDelete: "RESTRICT", nullable: true })
@JoinTable()
rate: RemitConfigRate;
@Column({
nullable: true,
type: "float8",
})
total: Number;
@Column({
nullable: true,
length: 4096,
@ -81,14 +92,14 @@ export class RemitTransaction {
@Column({ nullable: true })
approved_at: Date;
@Column({ nullable: true, length: 256, })
@Column({ nullable: true, length: 256 })
approved_by: string;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true, length: 256, })
@Column({ nullable: true, length: 256 })
created_by: string;
@Column({ nullable: true })