From c12989c5d4428f2246c62eaeba47329b82edf755 Mon Sep 17 00:00:00 2001 From: fro1991 Date: Wed, 22 Oct 2025 00:03:40 +0700 Subject: [PATCH] update --- src/entity/trx_country_currencies.ts | 38 ++++++++++++++++++++++++++++ src/schema/trx.ts | 1 + 2 files changed, 39 insertions(+) create mode 100644 src/entity/trx_country_currencies.ts diff --git a/src/entity/trx_country_currencies.ts b/src/entity/trx_country_currencies.ts new file mode 100644 index 0000000..f083cb6 --- /dev/null +++ b/src/entity/trx_country_currencies.ts @@ -0,0 +1,38 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; +import { TrxCountry } from "./trx_countries"; +import { TrxCurrency } from "./trx_currencies"; + +@Entity("trx_country_currencies", { schema: "trx" }) +export class TrxCountryCurrency { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => TrxCountry, { onDelete: "NO ACTION" }) + @JoinColumn() + country: TrxCountry; + + @ManyToOne(() => TrxCurrency, { onDelete: "NO ACTION" }) + @JoinColumn() + currency: TrxCurrency; + + @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; +} diff --git a/src/schema/trx.ts b/src/schema/trx.ts index 0373cbf..9a01bfd 100644 --- a/src/schema/trx.ts +++ b/src/schema/trx.ts @@ -7,6 +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_currency_rates"; export * from "../entity/trx_banks"; export * from "../entity/trx_bank_swifts";