From f599947282c69fbd1ebf97258a6c393e6fa6ea9a Mon Sep 17 00:00:00 2001 From: "fazri.is" Date: Thu, 1 Jan 2026 23:48:10 +0700 Subject: [PATCH] update --- src/entity/hrms/hrms_faculty.ts | 48 ----------------------------- src/entity/hrms/hrms_scholarship.ts | 22 +++++++------ src/entity/hrms/hrms_study.ts | 48 ----------------------------- src/entity/hrms/hrms_training.ts | 4 +-- src/schema/hrms.ts | 2 -- 5 files changed, 13 insertions(+), 111 deletions(-) delete mode 100644 src/entity/hrms/hrms_faculty.ts delete mode 100644 src/entity/hrms/hrms_study.ts diff --git a/src/entity/hrms/hrms_faculty.ts b/src/entity/hrms/hrms_faculty.ts deleted file mode 100644 index e4862f6..0000000 --- a/src/entity/hrms/hrms_faculty.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm"; - -import { Status } from "../../types/status"; - -@Entity("hrms_faculties", { schema: "hrms" }) -export class HrmsFaculty { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 128, - }) - code: string; - - @Column({ - nullable: false, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @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 86743c1..e350b44 100644 --- a/src/entity/hrms/hrms_scholarship.ts +++ b/src/entity/hrms/hrms_scholarship.ts @@ -1,27 +1,29 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm"; import { Status } from "../../types/status"; -import { HrmsFaculty } from "./hrms_faculty"; import { HrmsEmployee } from "./hrms_employee"; -import { HrmsStudy } from "./hrms_study"; @Entity("hrms_scholarships", { schema: "hrms" }) export class HrmsScholarship { @PrimaryGeneratedColumn("uuid") id: string; - @ManyToOne(() => HrmsFaculty, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - faculty: HrmsFaculty; - - @ManyToOne(() => HrmsStudy, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - study: HrmsStudy; - @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: false }) @JoinColumn() employee: HrmsEmployee; + @Column({ + nullable: false, + length: 256, + }) + faculty: string; + + @Column({ + nullable: false, + length: 256, + }) + study: string; + @Column({ nullable: false, length: 256, diff --git a/src/entity/hrms/hrms_study.ts b/src/entity/hrms/hrms_study.ts deleted file mode 100644 index 933fe69..0000000 --- a/src/entity/hrms/hrms_study.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm"; - -import { Status } from "../../types/status"; - -@Entity("studies", { schema: "hrms" }) -export class HrmsStudy { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 128, - }) - code: string; - - @Column({ - nullable: false, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @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 28f726c..9cc291f 100644 --- a/src/entity/hrms/hrms_training.ts +++ b/src/entity/hrms/hrms_training.ts @@ -1,8 +1,6 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm"; +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"; import { Status } from "../../types/status"; -import { HrmsFaculty } from "./hrms_faculty"; -import { HrmsEmployee } from "./hrms_employee"; @Entity("hrms_trainings", { schema: "hrms" }) export class HrmsTraining { diff --git a/src/schema/hrms.ts b/src/schema/hrms.ts index 8ad426f..da3500f 100644 --- a/src/schema/hrms.ts +++ b/src/schema/hrms.ts @@ -6,8 +6,6 @@ export * from "../entity/hrms/hrms_leave_type"; export * from "../entity/hrms/hrms_shift"; export * from "../entity/hrms/hrms_employee"; export * from "../entity/hrms/hrms_scholarship"; -export * from "../entity/hrms/hrms_faculty"; -export * from "../entity/hrms/hrms_study"; export * from "../entity/hrms/hrms_training"; export * from "../entity/hrms/hrms_training_participant";