From dd3c8ed9fe272a43aa430af2a0701f5a11712f01 Mon Sep 17 00:00:00 2001 From: meusinfirmary Date: Mon, 21 Apr 2025 02:51:31 +0700 Subject: [PATCH] upadate --- src/entity/remit_config_allocation.ts | 57 +++++++++++++++++++ ..._config.ts => remit_config_transaction.ts} | 4 +- src/entity/remit_partners.ts | 6 ++ src/index.ts | 6 +- 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 src/entity/remit_config_allocation.ts rename src/entity/{remit_config.ts => remit_config_transaction.ts} (90%) diff --git a/src/entity/remit_config_allocation.ts b/src/entity/remit_config_allocation.ts new file mode 100644 index 0000000..967f279 --- /dev/null +++ b/src/entity/remit_config_allocation.ts @@ -0,0 +1,57 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; + +import { Status } from "../types/status"; + +@Entity("remit_config_allocations", { schema: "remits" }) +export class RemitConfigAllocation { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: true, + length: 256, + }) + type: string; + + @Column({ + nullable: true, + length: 256, + }) + bri_value: string; + + @Column({ + nullable: true, + length: 256, + }) + partner_value: string; + + @Column({ + nullable: false, + length: 64, + }) + status: Status; + + @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; +} diff --git a/src/entity/remit_config.ts b/src/entity/remit_config_transaction.ts similarity index 90% rename from src/entity/remit_config.ts rename to src/entity/remit_config_transaction.ts index 83922f4..bc2842c 100644 --- a/src/entity/remit_config.ts +++ b/src/entity/remit_config_transaction.ts @@ -2,8 +2,8 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateCol import { Status } from "../types/status"; -@Entity("remit_configs", { schema: "remits" }) -export class RemitConfig { +@Entity("remit_config_transactions", { schema: "remits" }) +export class RemitConfigTransaction { @PrimaryGeneratedColumn("uuid") id: string; diff --git a/src/entity/remit_partners.ts b/src/entity/remit_partners.ts index b2d972e..c5884fe 100644 --- a/src/entity/remit_partners.ts +++ b/src/entity/remit_partners.ts @@ -32,6 +32,12 @@ export class RemitPartner { }) address: string; + @Column({ + nullable: false, + length: 4096, + }) + type: string; + @Column({ nullable: false, unique: false, diff --git a/src/index.ts b/src/index.ts index 11c0b4a..360c7d3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -88,7 +88,8 @@ import { RemitTransfer } from "./entity/remit_tansfer"; import { RemitTopup } from "./entity/remit_topup"; import { RemitMutation } from "./entity/remit_mutation"; import { RemitBank } from "./entity/remit_bank"; -import { RemitConfig } from "./entity/remit_config"; +import { RemitConfigTransaction } from "./entity/remit_config_transaction"; +import { RemitConfigAllocation } from "./entity/remit_config_allocation"; export { User, // @@ -188,5 +189,6 @@ export { RemitTopup, RemitMutation, RemitBank, - RemitConfig, + RemitConfigTransaction, + RemitConfigAllocation, };