From 1e9293d9449a576b70139181eb76e86ae8a36d23 Mon Sep 17 00:00:00 2001 From: fadlydev Date: Thu, 6 Feb 2025 12:16:23 +0700 Subject: [PATCH] add missing field, approval, requested_by --- src/entity/request_submission.ts | 34 ++++++++------------------------ 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/entity/request_submission.ts b/src/entity/request_submission.ts index df5992f..b715841 100644 --- a/src/entity/request_submission.ts +++ b/src/entity/request_submission.ts @@ -26,6 +26,11 @@ export class RequestSubmission { @JoinColumn({ name: 'request_order_id' }) request_order: RequestOrder; + @Column({ type: 'varchar', nullable: false }) + requested_by: string; + + @Column({ type: 'varchar', nullable: false }) + department: string; @Column({ type: 'varchar', nullable: false, unique: true }) code_id: string; @@ -36,9 +41,6 @@ export class RequestSubmission { @Column({ type: 'text', nullable: true }) remarks: string; - @Column({ type: 'varchar', nullable: true }) - department: string; - @Column({ length: 64, nullable: false }) status: string; @@ -54,19 +56,6 @@ export class RequestSubmission { @Column({ type: 'decimal', precision: 12, scale: 2, nullable: false, default: 0.0 }) amount: number; - @Column({ type: 'decimal', precision: 12, scale: 2, nullable: false, default: 0.0 }) - total: number; - - // Supervisor Approval - @Column({ type: 'varchar', nullable: true }) - approved_by_spv: string | null; - - @Column({ type: 'timestamp', nullable: true }) - spv_approval_date: Date | null; - - @Column({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING }) - spv_approval_status: ApprovalStatus; - // General Manager Approval @Column({ type: 'varchar', nullable: true }) approved_by_gm: string | null; @@ -77,16 +66,9 @@ export class RequestSubmission { @Column({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING }) gm_approval_status: ApprovalStatus; - // General Affairs (GA) Approval - @Column({ type: 'varchar', nullable: true }) - approved_by_ga: string | null; - - @Column({ type: 'timestamp', nullable: true }) - ga_approval_date: Date | null; - - @Column({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING }) - ga_approval_status: ApprovalStatus; - + @Column({ type: 'text', nullable: true }) + gm_approval_remarks: string | null; + @CreateDateColumn() created_at: Date;