diff --git a/src/entity/bank_garansi.ts b/src/entity/bank_garansi.ts index eb6ea97..7f7fae0 100644 --- a/src/entity/bank_garansi.ts +++ b/src/entity/bank_garansi.ts @@ -126,6 +126,12 @@ export class BankGaransi { }) created_by: string; + @Column({ + nullable: true, + length: 256, + }) + approved_by: string; + @Column({ nullable: true }) @UpdateDateColumn() updated_at: Date; diff --git a/src/entity/bank_garansi_pending.ts b/src/entity/bank_garansi_pending.ts new file mode 100644 index 0000000..b35ab27 --- /dev/null +++ b/src/entity/bank_garansi_pending.ts @@ -0,0 +1,132 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; +import { BankGaransiType } from "./bank_garansi_type"; +import { BankGaransiStatus } from "./bank_garansi_status"; + +// import { CategorySource } from '../types/category_source'; +// import { Status } from '../types/status'; +// import { Target } from './targets'; + +@Entity("bank_garansi") +export class BankGaransi { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: true, + }) + open_date: Date; + + @Column({ + nullable: true, + }) + start_date: Date; + + @Column({ + nullable: true, + length: 256, + }) + name: string; + + @Column({ + nullable: true, + length: 256, + }) + email: string; + + @Column({ + nullable: true, + length: 256, + }) + phone: string; + + @Column({ + nullable: true, + length: 256, + }) + contract_number: string; + + @ManyToOne(() => BankGaransiType, (bank_garansi_type) => bank_garansi_type.bank_garansi) + @JoinColumn({ name: "bgTypeId" }) // Add foreign key column + bank_garansi_type: BankGaransiType; + + @Column({ nullable: false }) + bgTypeId: string; + + @Column({ + nullable: true, + length: 256, + }) + project_owner: string; + + @Column({ + nullable: true, + length: 256, + }) + project_name: string; + + @Column({ + type: "float8", + nullable: true, + }) + nominal: number; + + @Column({ + nullable: true, + }) + release_date: Date; + + @Column({ + nullable: true, + }) + due_date: Date; + + @Column({ + nullable: true, + }) + accounting_date: Date; + + @Column({ + type: "float8", + nullable: true, + }) + admin_fee: number; + + @Column({ + type: "float8", + nullable: true, + }) + provision: number; + + @Column({ nullable: false }) + bgStatusId: string; + + @Column({ + nullable: true, + length: 4096, + }) + description: string; + + @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; +}