From 7d2747f2e759caa5f50fd946de875cfd70a8ba62 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Thu, 23 Jan 2025 11:08:10 +0700 Subject: [PATCH] update new table teller mutation --- src/entity/log_pull.ts | 6 +++ src/entity/teller_mutation.ts | 83 +++++++++++++++++++++++++++++++++++ src/index.ts | 5 ++- src/types/pull.ts | 10 ++++- 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 src/entity/teller_mutation.ts diff --git a/src/entity/log_pull.ts b/src/entity/log_pull.ts index 99c20e0..9f321c6 100644 --- a/src/entity/log_pull.ts +++ b/src/entity/log_pull.ts @@ -37,6 +37,12 @@ export class LogPull { }) date_index: string; + @Column({ + nullable: true, + length: 8 + }) + teller_id: string; + @Column({ nullable: false, default: false diff --git a/src/entity/teller_mutation.ts b/src/entity/teller_mutation.ts new file mode 100644 index 0000000..0024229 --- /dev/null +++ b/src/entity/teller_mutation.ts @@ -0,0 +1,83 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm'; +import { Branch } from './branchs'; + +@Entity('teller_mutation') +export class TellerMutation { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + nullable: false, + length: 64 + }) + reference_number: string; + + @ManyToOne(() => Branch, { onDelete: "RESTRICT" }) + @JoinColumn() + branch: Branch + + @Column({ + nullable: true, + }) + position_datetime: Date; + + @Column({ + nullable: true, + length: 10 + }) + teller_code: string; + + @Column({ + nullable: true, + length: 32 + }) + tran: string; + + @Column({ + nullable: true, + length: 512 + }) + transaction_name: string; + + @Column({ + nullable: true, + length: 32 + }) + account_number: string; + + @Column({ + nullable: true, + length: 256 + }) + account_holder: string; + + @Column({ + type: 'float8', + nullable: false, + }) + mutation_amount: number; + + @Column({ + length: 3, + nullable: true, + }) + currency: string; + + @Column({ + length: 64, + nullable: true, + }) + supervisor: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column() + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ecb5def..b6d2c1a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,7 +23,7 @@ import { IncomeTier } from "./entity/income_tier"; import { Munisipo } from "./entity/munisipo"; import { Suco } from "./entity/suco"; import { LogPull } from "./entity/log_pull"; -import { LogPullType, StatusLogPull } from "./types/pull"; +import { LogPullType, StatusLogPull, TellerCode } from "./types/pull"; import { Category } from "./entity/categories"; import { CategorySource } from "./types/category_source"; import { PullerStatus } from "./entity/puller_status"; @@ -68,6 +68,7 @@ import { AssetJournalEntry } from "./entity/journal_entries"; import { PaymentApproval } from "./entity/payment_approval"; import { FinanceMemo } from "./entity/finance_memo"; import { BankGaransiPending } from "./entity/bank_garansi_pending"; +import { TellerMutation } from "./entity/teller_mutation"; export { User, // @@ -101,6 +102,7 @@ export { LogPull, LogPullType, StatusLogPull, + TellerCode, Category, CategorySource, CategoryType, @@ -146,4 +148,5 @@ export { CreditApplicationChat, CreditApplicationFileStatus, Application, + TellerMutation }; diff --git a/src/types/pull.ts b/src/types/pull.ts index 6b4406b..d560aa3 100644 --- a/src/types/pull.ts +++ b/src/types/pull.ts @@ -3,9 +3,17 @@ export enum LogPullType { "CIF_BEREKENING" = "CIF_BEREKENING", "TRIAL_BALANCE_BRANCH" = "TRIAL_BALANCE_BRANCH", "TRIAL_BALANCE_KONSOLIDASI" = "TRIAL_BALANCE_KONSOLIDASI", - "TRANSAKSI_CS" = "TRANSAKSI_CS" + "TRANSAKSI_CS" = "TRANSAKSI_CS", + "TELLER_MUTATION" = "TELLER_MUTATION" }; +export const TellerCode = { + "0452": ["0452051", "0452052", "0452053", "0452054", "0452055", "0452056", "0452057", "0452058", "0452059"], + "0453": ["0453051"], + "0454": ["0454051"], + "0455": ["0455051", "0455052"] +} + export enum StatusLogPull { "Waiting Schedule" = "W",