From 775ac8ebe6ce23f7efb85dde4a86318fa6a4a363 Mon Sep 17 00:00:00 2001 From: rahman Date: Thu, 4 Dec 2025 16:09:02 +0700 Subject: [PATCH] add table mutation gl and column ledget on table log_pull also log pull type MUTATION_GL --- src/entity/log_pull.ts | 6 ++++ src/entity/mutation_gl.ts | 65 +++++++++++++++++++++++++++++++++++++++ src/schema/public.ts | 1 + src/types/pull.ts | 3 +- 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/entity/mutation_gl.ts diff --git a/src/entity/log_pull.ts b/src/entity/log_pull.ts index 9f321c6..a069f35 100644 --- a/src/entity/log_pull.ts +++ b/src/entity/log_pull.ts @@ -43,6 +43,12 @@ export class LogPull { }) teller_id: string; + @Column({ + nullable: true, + length: 64 + }) + ledger: string; + @Column({ nullable: false, default: false diff --git a/src/entity/mutation_gl.ts b/src/entity/mutation_gl.ts new file mode 100644 index 0000000..68d3c61 --- /dev/null +++ b/src/entity/mutation_gl.ts @@ -0,0 +1,65 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm'; +import { Branch } from './branchs'; + +@Entity('mutation_gl') +export class MutationGL { + @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: 64 + }) + ledger: string; + + @Column({ + type: 'float8', + nullable: true, + }) + amount_debit: number; + + @Column({ + type: 'float8', + nullable: true, + }) + amount_credit: number; + + @Column({ + type: 'float8', + nullable: true, + }) + amount_final: number; + + @Column({ + nullable: true, + length: 1000 + }) + description: 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/schema/public.ts b/src/schema/public.ts index 858e708..585cf00 100644 --- a/src/schema/public.ts +++ b/src/schema/public.ts @@ -33,6 +33,7 @@ export * from "../entity/bpa_log"; export * from "../entity/bpa"; export * from "../entity/application"; export * from "../entity/teller_mutation"; +export * from "../entity/mutation_gl"; export * from "../types/action"; export * from "../types/error"; diff --git a/src/types/pull.ts b/src/types/pull.ts index d560aa3..2088b4d 100644 --- a/src/types/pull.ts +++ b/src/types/pull.ts @@ -4,7 +4,8 @@ export enum LogPullType { "TRIAL_BALANCE_BRANCH" = "TRIAL_BALANCE_BRANCH", "TRIAL_BALANCE_KONSOLIDASI" = "TRIAL_BALANCE_KONSOLIDASI", "TRANSAKSI_CS" = "TRANSAKSI_CS", - "TELLER_MUTATION" = "TELLER_MUTATION" + "TELLER_MUTATION" = "TELLER_MUTATION", + "MUTATION_GL" = "MUTATION_GL" }; export const TellerCode = {