From ce3ade48de97214b64c5166459136f074ac17e8e Mon Sep 17 00:00:00 2001 From: fro1991 Date: Sat, 25 Oct 2025 02:32:46 +0700 Subject: [PATCH] update --- ..._country_currencies.ts => trx_country_bank_currencies.ts} | 5 +++++ src/schema/trx.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) rename src/entity/{trx_country_currencies.ts => trx_country_bank_currencies.ts} (88%) diff --git a/src/entity/trx_country_currencies.ts b/src/entity/trx_country_bank_currencies.ts similarity index 88% rename from src/entity/trx_country_currencies.ts rename to src/entity/trx_country_bank_currencies.ts index f083cb6..4452762 100644 --- a/src/entity/trx_country_currencies.ts +++ b/src/entity/trx_country_bank_currencies.ts @@ -1,6 +1,7 @@ import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; import { TrxCountry } from "./trx_countries"; import { TrxCurrency } from "./trx_currencies"; +import { TrxBank } from "./trx_banks"; @Entity("trx_country_currencies", { schema: "trx" }) export class TrxCountryCurrency { @@ -11,6 +12,10 @@ export class TrxCountryCurrency { @JoinColumn() country: TrxCountry; + @ManyToOne(() => TrxBank, { onDelete: "NO ACTION" }) + @JoinColumn() + bank: TrxBank; + @ManyToOne(() => TrxCurrency, { onDelete: "NO ACTION" }) @JoinColumn() currency: TrxCurrency; diff --git a/src/schema/trx.ts b/src/schema/trx.ts index d4a8ecc..1acb06b 100644 --- a/src/schema/trx.ts +++ b/src/schema/trx.ts @@ -7,7 +7,7 @@ export * from "../entity/trx_customer_user_activities"; export * from "../entity/trx_customer_costs"; export * from "../entity/trx_countries"; export * from "../entity/trx_currencies"; -export * from "../entity/trx_country_currencies"; +export * from "../entity/trx_country_bank_currencies"; export * from "../entity/trx_currency_rates"; export * from "../entity/trx_banks"; export * from "../entity/trx_bank_swifts";