upudate
This commit is contained in:
50
src/entity/earchive_approval.ts
Normal file
50
src/entity/earchive_approval.ts
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { User } from "./users";
|
||||||
|
import { EarchiveDoc } from "./earchive_doc";
|
||||||
|
|
||||||
|
@Entity("earchive_approval", { schema: "earchive" })
|
||||||
|
export class EarchiveApproval {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ name: 'docid', type: 'uuid', nullable: true })
|
||||||
|
docid: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => EarchiveDoc, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'docid' })
|
||||||
|
doc: EarchiveDoc;
|
||||||
|
|
||||||
|
@Column({ name: 'uuidapproval', type: 'uuid', nullable: true })
|
||||||
|
uuidapproval: string;
|
||||||
|
|
||||||
|
@Column({ name: 'approvaldate', nullable: true })
|
||||||
|
approvaldate: Date;
|
||||||
|
|
||||||
|
@Column({ type: 'int', nullable: true , default : 0})
|
||||||
|
isapproved: Number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ name: 'createdbyid', type: 'uuid', nullable: true })
|
||||||
|
createdbyid: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => User, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'createdbyid' })
|
||||||
|
createdby: User
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -1,7 +1,9 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { User } from "./users";
|
import { User } from "./users";
|
||||||
import { StatusDocument, TypeDocument, TypePriority } from "../types/earchive";
|
import { BranchCode, StatusDocument, TypeCredential, TypeDocument, TypePriority } from "../types/earchive";
|
||||||
import { EarchiveDocLogs } from "./earchive_doclogs";
|
import { EarchiveDocLogs } from "./earchive_doclogs";
|
||||||
|
import { EarchiveReceiver } from "./earchive_receiver";
|
||||||
|
import { EarchiveApproval } from "./earchive_approval";
|
||||||
|
|
||||||
@Entity("earchive_doc", { schema: "earchive" })
|
@Entity("earchive_doc", { schema: "earchive" })
|
||||||
export class EarchiveDoc {
|
export class EarchiveDoc {
|
||||||
@ -11,6 +13,12 @@ export class EarchiveDoc {
|
|||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
docnumber: string;
|
docnumber: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
branchcode: BranchCode;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
branchname: string;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
docsubject: string;
|
docsubject: string;
|
||||||
|
|
||||||
@ -20,6 +28,12 @@ export class EarchiveDoc {
|
|||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
doctypename: string;
|
doctypename: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
doccredential: TypeCredential;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
doccredentialname: string;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
docpriority: TypePriority;
|
docpriority: TypePriority;
|
||||||
|
|
||||||
@ -30,33 +44,33 @@ export class EarchiveDoc {
|
|||||||
docdates: Date;
|
docdates: Date;
|
||||||
|
|
||||||
@Column({ name: 'approvalbyid', type: 'uuid', nullable: true })
|
@Column({ name: 'approvalbyid', type: 'uuid', nullable: true })
|
||||||
approvalbyid: string;
|
approvalbyid: string;
|
||||||
|
|
||||||
// @OneToOne(() => User, { nullable: true })
|
// @OneToOne(() => User, { nullable: true })
|
||||||
// @JoinColumn({ name: 'approvalbyid' })
|
// @JoinColumn({ name: 'approvalbyid' })
|
||||||
// approvalby: User
|
// approvalby: User
|
||||||
|
|
||||||
@Column({ name: 'approvaldate', nullable: true })
|
@Column({ name: 'approvaldate', nullable: true })
|
||||||
approvaldate: Date;
|
approvaldate: Date;
|
||||||
|
|
||||||
@Column({ name: 'dispositionbyid', type: 'uuid', nullable: true })
|
@Column({ name: 'dispositionbyid', type: 'uuid', nullable: true })
|
||||||
dispositionbyid: string;
|
dispositionbyid: string;
|
||||||
|
|
||||||
// @OneToOne(() => User, { nullable: true })
|
// @OneToOne(() => User, { nullable: true })
|
||||||
// @JoinColumn({ name: 'dispositionbyid' })
|
// @JoinColumn({ name: 'dispositionbyid' })
|
||||||
// dispositionby: User
|
// dispositionby: User
|
||||||
|
|
||||||
@Column({ name: 'dispositiondate', nullable: true })
|
@Column({ name: 'dispositiondate', nullable: true })
|
||||||
dispositiondate: Date;
|
dispositiondate: Date;
|
||||||
|
|
||||||
@Column({ name: 'attachdoc', nullable: true })
|
@Column({ name: 'attachdoc', nullable: true })
|
||||||
attachdoc: string;
|
attachdoc: string;
|
||||||
|
|
||||||
@Column({ name: 'attachdocurl', nullable: true })
|
@Column({ name: 'attachdocurl', nullable: true })
|
||||||
attachdocurl: string;
|
attachdocurl: string;
|
||||||
|
|
||||||
@Column({ name: 'attachlink', nullable: true })
|
@Column({ name: 'attachlink', nullable: true })
|
||||||
attachlink: string;
|
attachlink: string;
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
@Column({ type: 'text', nullable: true })
|
||||||
content: string;
|
content: string;
|
||||||
@ -74,10 +88,16 @@ export class EarchiveDoc {
|
|||||||
remarks: string;
|
remarks: string;
|
||||||
|
|
||||||
@OneToMany(() => EarchiveDocLogs, (ipo) => ipo.docs, {
|
@OneToMany(() => EarchiveDocLogs, (ipo) => ipo.docs, {
|
||||||
cascade: false,
|
cascade: false,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
logs: EarchiveDocLogs;
|
logs: EarchiveDocLogs;
|
||||||
|
|
||||||
|
@OneToMany(() => EarchiveReceiver, (r) => r.doc)
|
||||||
|
receivers: EarchiveReceiver[];
|
||||||
|
|
||||||
|
@OneToMany(() => EarchiveApproval, (r) => r.doc)
|
||||||
|
approval: EarchiveApproval[];
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
|
|||||||
62
src/entity/earchive_link.ts
Normal file
62
src/entity/earchive_link.ts
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { User } from "./users";
|
||||||
|
import { EarchiveDoc } from "./earchive_doc";
|
||||||
|
|
||||||
|
@Entity("earchive_link", { schema: "earchive" })
|
||||||
|
export class EarchiveLink {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ name: 'docid', type: 'uuid', nullable: true })
|
||||||
|
docid: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => EarchiveDoc, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'docid' })
|
||||||
|
doc: EarchiveDoc;
|
||||||
|
|
||||||
|
@Column({ name: 'title', nullable: true })
|
||||||
|
title: string;
|
||||||
|
|
||||||
|
@Column({ name: 'link', nullable: true })
|
||||||
|
link: string;
|
||||||
|
|
||||||
|
@Column({ name: 'linksort', nullable: true })
|
||||||
|
linksort: string;
|
||||||
|
|
||||||
|
@Column({ name: 'description', nullable: true })
|
||||||
|
description: string;
|
||||||
|
|
||||||
|
@Column({ name: 'startdate', nullable: true })
|
||||||
|
startdate: Date;
|
||||||
|
|
||||||
|
@Column({ name: 'enddate', nullable: true })
|
||||||
|
enddate: Date;
|
||||||
|
|
||||||
|
@Column({ type: 'int', nullable: true , default : 0})
|
||||||
|
limit: Number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ name: 'createdbyid', type: 'uuid', nullable: true })
|
||||||
|
createdbyid: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => User, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'createdbyid' })
|
||||||
|
createdby: User
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -2,4 +2,6 @@ export * from "../entity/earchive_doc";
|
|||||||
export * from "../entity/earchive_doctype";
|
export * from "../entity/earchive_doctype";
|
||||||
export * from "../entity/earchive_doclogs";
|
export * from "../entity/earchive_doclogs";
|
||||||
export * from "../entity/earchive_receiver";
|
export * from "../entity/earchive_receiver";
|
||||||
|
export * from "../entity/earchive_approval";
|
||||||
|
export * from "../entity/earchive_link";
|
||||||
export * from "../types/earchive";
|
export * from "../types/earchive";
|
||||||
@ -15,9 +15,25 @@ export enum TypeDocument {
|
|||||||
"Surat_Izin_Prinsip" = "SIP"
|
"Surat_Izin_Prinsip" = "SIP"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export enum BranchCode {
|
||||||
|
"Bussiness_Department" = "BSN",
|
||||||
|
"Operation_Department" = "OPR",
|
||||||
|
"Risk_Management" = "RMC",
|
||||||
|
"Credit_Risk" = "CRR",
|
||||||
|
"Complain_Function" = "CMP"
|
||||||
|
};
|
||||||
|
|
||||||
|
export enum TypeCredential {
|
||||||
|
"Kerahasiaan" = "KR",
|
||||||
|
"Biasa" = "B",
|
||||||
|
"Rahasia" = "R",
|
||||||
|
"Sangat_Rahasia" = "SR"
|
||||||
|
};
|
||||||
|
|
||||||
export enum TypeReceiver {
|
export enum TypeReceiver {
|
||||||
"Personal" = "P",
|
"Personal" = "P",
|
||||||
"Department" = "D"
|
"Department" = "D",
|
||||||
|
"Tembusan" = "T"
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum TypePriority {
|
export enum TypePriority {
|
||||||
|
|||||||
Reference in New Issue
Block a user