Files
entity/src/entity/bank_garansi.ts
meusinfirmary 59f5d6b18c update
2025-02-06 04:58:58 +07:00

256 lines
3.7 KiB
TypeScript

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 { BankGaransiPic } from "./bank_garansi_pic";
import { Branch } from "./branchs";
@Entity("bank_garansi")
export class BankGaransi {
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({
nullable: true,
})
open_date: Date;
@Column({
nullable: true,
})
application_date: Date;
@Column({
nullable: true,
})
start_date: Date;
@Column({
nullable: true,
length: 256,
})
name: string;
@Column({
nullable: true,
length: 4096,
})
applicant_address: string;
@Column({
nullable: true,
length: 4096,
})
applicant_account_number: string;
@Column({
nullable: true,
length: 256,
})
email: string;
@Column({
nullable: true,
length: 256,
})
phone: string;
@Column({
nullable: true,
length: 256,
})
bg_number: string;
@Column({
nullable: true,
length: 256,
})
contract_number: String;
@Column({
nullable: true,
length: 256,
})
contract_date: 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: 4096,
})
project_owner_address: 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: true,
length: 256,
})
doc_bang_guarantee: string;
@Column({
nullable: true,
length: 256,
})
doc_transfer_ownership: string;
@Column({
nullable: true,
length: 256,
})
doc_transfer_rights: string;
@Column({
nullable: true,
length: 256,
})
doc_agreement_bg: string;
@Column({
nullable: true,
length: 256,
})
doc_power_of_attorney: string;
@Column({
nullable: true,
length: 256,
})
doc_statement_letter: string;
@Column({
nullable: true,
length: 256,
})
doc_opening: string;
@Column({
nullable: true,
length: 256,
})
doc_publishing: string;
@ManyToOne(() => BankGaransiStatus, (bank_garansi_status) => bank_garansi_status.bank_garansi)
@JoinColumn({ name: "bgStatusId" })
bank_garansi_status: BankGaransiStatus;
@Column({ nullable: false })
bgStatusId: string;
@Column({
nullable: true,
length: 4096,
})
description: string;
@Column({
nullable: true,
length: 256,
})
tin_number: string;
@Column({
nullable: true,
length: 256,
})
sign_by_name: string;
@Column({
nullable: true,
length: 256,
})
sign_by_title: string;
@Column({
nullable: true,
length: 4096,
})
bri_party: string;
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
@JoinColumn()
branch: Branch;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({
nullable: true,
length: 256,
})
created_by: string;
@Column()
@CreateDateColumn()
approved_at: Date;
@Column({
nullable: true,
length: 256,
})
approved_by: string;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({
nullable: true,
length: 256,
})
updated_by: string;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
}