This commit is contained in:
2026-01-01 23:48:10 +07:00
parent beb05f0e7c
commit f599947282
5 changed files with 13 additions and 111 deletions

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}

View File

@ -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 {

View File

@ -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";