add decision

This commit is contained in:
2025-12-02 12:39:54 +07:00
parent 720dc6ac6f
commit b1a3804dd6
4 changed files with 68 additions and 0 deletions

View 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_decision", { schema: "earchive" })
export class EarchiveDecision {
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({ type: 'int', nullable: true , default : 0})
sorts: Number;
@Column({ name: 'docid', type: 'uuid', nullable: true })
docid: string;
@ManyToOne(() => EarchiveDoc, { nullable: true })
@JoinColumn({ name: 'docid' })
doc: EarchiveDoc;
@Column({ name: 'nik', nullable: true })
nik: string;
@Column({ name: 'employeename', nullable: true })
employeename: string;
@Column({ name: 'uuiddecision', type: 'uuid', nullable: true })
uuiddecision: string;
@Column({ name: 'decisiondate', nullable: true })
decisiondate: Date;
@Column({ type: 'int', nullable: true , default : 0})
isapproved: Number;
@Column({ name: 'remarks', nullable: true })
remarks: string;
@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;
}

View File

@ -8,6 +8,7 @@ import { EarchiveLink } from "./earchive_link";
import { EarchiveDisposisi } from "./earchive_disposisi";
import { EarchiveChecker } from "./earchive_checker";
import { EarchiveStar } from "./earchive_star";
import { EarchiveDecision } from "./earchive_decision";
@Entity("earchive_doc", { schema: "earchive" })
export class EarchiveDoc {
@ -126,6 +127,9 @@ export class EarchiveDoc {
@OneToMany(() => EarchiveDisposisi, (r) => r.doc)
disposisi: EarchiveDisposisi[];
@OneToMany(() => EarchiveDecision, (r) => r.doc)
decision: EarchiveDecision[];
@OneToMany(() => EarchiveStar, (r) => r.doc)
star: EarchiveStar[];

View File

@ -6,5 +6,6 @@ export * from "../entity/earchive_checker";
export * from "../entity/earchive_approval";
export * from "../entity/earchive_link";
export * from "../entity/earchive_disposisi";
export * from "../entity/earchive_decision";
export * from "../entity/earchive_star";
export * from "../types/earchive";

View File

@ -6,6 +6,7 @@ export enum StatusDocument {
"checker" = 1,
"approval" = 2,
"disposition" = 3,
"decision" = 4,
};
export enum TypeDocument {