From cf3a0704651631f0d6282f707bc45e94a8a6a0b7 Mon Sep 17 00:00:00 2001 From: "fazri.is" Date: Wed, 31 Dec 2025 13:53:47 +0700 Subject: [PATCH] update --- src/entity/hrms/hrms_faculty.ts | 9 +++++++++ src/entity/hrms/hrms_scholarship.ts | 18 ++++++++++++++++-- src/entity/hrms/hrms_study.ts | 9 +++++++++ src/entity/hrms/hrms_training.ts | 9 +++++++++ src/entity/hrms/hrms_training_participant.ts | 9 +++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/entity/hrms/hrms_faculty.ts b/src/entity/hrms/hrms_faculty.ts index 62f99ad..735f95a 100644 --- a/src/entity/hrms/hrms_faculty.ts +++ b/src/entity/hrms/hrms_faculty.ts @@ -29,11 +29,20 @@ export class HrmsFaculty { @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; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; } diff --git a/src/entity/hrms/hrms_scholarship.ts b/src/entity/hrms/hrms_scholarship.ts index 129b02f..d7138e6 100644 --- a/src/entity/hrms/hrms_scholarship.ts +++ b/src/entity/hrms/hrms_scholarship.ts @@ -3,17 +3,22 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateCol import { Status } from "../../types/status"; import { HrmsFaculty } from "./hrms_faculty"; import { HrmsEmployee } from "./hrms_employee"; +import { HrmsStudy } from "./hrms_study"; @Entity("hrms_scholarships") export class HrmsScholarship { @PrimaryGeneratedColumn("uuid") id: string; - @ManyToOne(() => HrmsFaculty, { onDelete: "NO ACTION", nullable: true }) + @ManyToOne(() => HrmsFaculty, { onDelete: "NO ACTION", nullable: false }) @JoinColumn() faculty: HrmsFaculty; - @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true }) + @ManyToOne(() => HrmsStudy, { onDelete: "NO ACTION", nullable: false }) + @JoinColumn() + study: HrmsStudy; + + @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: false }) @JoinColumn() employee: HrmsEmployee; @@ -45,11 +50,20 @@ export class HrmsScholarship { @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; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; } diff --git a/src/entity/hrms/hrms_study.ts b/src/entity/hrms/hrms_study.ts index d66e088..e50fe6a 100644 --- a/src/entity/hrms/hrms_study.ts +++ b/src/entity/hrms/hrms_study.ts @@ -29,11 +29,20 @@ export class HrmsStudy { @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; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; } diff --git a/src/entity/hrms/hrms_training.ts b/src/entity/hrms/hrms_training.ts index 917152d..5e4ee5f 100644 --- a/src/entity/hrms/hrms_training.ts +++ b/src/entity/hrms/hrms_training.ts @@ -41,11 +41,20 @@ export class HrmsTraining { @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; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; } diff --git a/src/entity/hrms/hrms_training_participant.ts b/src/entity/hrms/hrms_training_participant.ts index d7e1dda..12f9b71 100644 --- a/src/entity/hrms/hrms_training_participant.ts +++ b/src/entity/hrms/hrms_training_participant.ts @@ -32,11 +32,20 @@ export class HrmsTrainingParticipant { @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; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; }