update entity bank_garansi

This commit is contained in:
meusinfirmary
2025-02-04 02:57:08 +07:00
parent 402093f0f4
commit e02d22bf6c
4 changed files with 161 additions and 34 deletions

View File

@ -1,6 +1,8 @@
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";
// import { CategorySource } from '../types/category_source';
// import { Status } from '../types/status';
@ -16,6 +18,11 @@ export class BankGaransi {
})
open_date: Date;
@Column({
nullable: true,
})
application_date: Date;
@Column({
nullable: true,
})
@ -27,6 +34,12 @@ export class BankGaransi {
})
name: string;
@Column({
nullable: true,
length: 4096,
})
submitter_address: string;
@Column({
nullable: true,
length: 256,
@ -45,11 +58,22 @@ export class BankGaransi {
})
bg_number: string;
@Column({
nullable: true,
})
contract_number: Date;
@Column({
nullable: true,
length: 4096,
})
contract_title: String;
@Column({
nullable: true,
length: 256,
})
contract_number: string;
contract_date: string;
@ManyToOne(() => BankGaransiType, (bank_garansi_type) => bank_garansi_type.bank_garansi)
@JoinColumn({ name: "bgTypeId" }) // Add foreign key column
@ -64,6 +88,12 @@ export class BankGaransi {
})
project_owner: string;
@Column({
nullable: true,
length: 4096,
})
project_owner_address: string;
@Column({
nullable: true,
length: 256,
@ -158,12 +188,46 @@ export class BankGaransi {
@Column({ nullable: false })
bgStatusId: string;
@ManyToOne(() => Branch, (branch) => branch.bank_garansi)
@JoinColumn({ name: "bgBranchId" })
branch: Branch;
@Column({ nullable: false })
bgBranchId: 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;
@OneToMany(() => BankGaransiPic, (bank_garansi_pic) => bank_garansi_pic.bank_garansi)
bank_garansi_pic: BankGaransiPic[];
@Column()
@CreateDateColumn()
created_at: Date;

View File

@ -0,0 +1,57 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { BankGaransi } from "./bank_garansi";
@Entity("bank_garansi_pic")
export class BankGaransiPic {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => BankGaransi, (bank_garansi) => bank_garansi.bank_garansi_pic)
@JoinColumn({ name: "bgId" })
bank_garansi: BankGaransi;
@Column({ nullable: false })
bgId: number;
@Column({
nullable: true,
length: 256,
})
name: string;
@Column({
nullable: true,
length: 256,
})
position: string;
@Column({
nullable: true,
length: 256,
})
title: string;
@Column({
nullable: true,
length: 4096,
})
address: string;
@Column({
nullable: true,
length: 256,
})
number_type: string;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
}

View File

@ -1,40 +1,44 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from 'typeorm';
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToMany } from "typeorm";
import { Status } from '../types/status';
import { Status } from "../types/status";
import { BankGaransi } from "./bank_garansi";
@Entity('branchs')
@Entity("branchs")
export class Branch {
@PrimaryGeneratedColumn('uuid')
id: string;
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({
nullable: false,
unique: true,
length: 6
})
code: string;
@Column({
nullable: false,
unique: true,
length: 6,
})
code: string;
@Column({
nullable: true,
length: 256
})
name: string;
@Column({
nullable: true,
length: 256,
})
name: string;
@Column({
nullable: false,
length: 64
})
status: Status;
@Column({
nullable: false,
length: 64,
})
status: Status;
@Column()
@CreateDateColumn()
created_at: Date;
@OneToMany(() => BankGaransi, (bank_garansi) => bank_garansi.bgBranchId)
bank_garansi: BankGaransi[];
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
}
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
}

View File

@ -31,6 +31,8 @@ import { Target } from "./entity/targets";
import { BankGaransi } from "./entity/bank_garansi";
import { BankGaransiType } from "./entity/bank_garansi_type";
import { BankGaransiStatus } from "./entity/bank_garansi_status";
import { BankGaransiPending } from "./entity/bank_garansi_pending";
import { BankGaransiPic } from "./entity/bank_garansi_pic";
import { CategoryType } from "./types/category";
import { Summarize } from "./entity/summarizes";
import { SummarizeLog } from "./entity/summarize_log";
@ -67,7 +69,6 @@ import { GoodsHandover } from "./entity/goods_handover";
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";
import { LogHikvision } from "./entity/log_hikvision";
import { CreditConfigs } from "./entity/credit_config";
@ -114,6 +115,7 @@ export {
BankGaransiPending,
BankGaransiType,
BankGaransiStatus,
BankGaransiPic,
Summarize,
SummarizeLog,
SummarizeLogStatus,
@ -152,5 +154,5 @@ export {
Application,
TellerMutation,
LogHikvision,
CreditConfigs
CreditConfigs,
};